Alaska Software Inc. - C/C++ compiling tutorial
Username: Password:
AuthorTopic: C/C++ compiling tutorial
Claudio Driussi C/C++ compiling tutorial
on Fri, 09 Sep 2022 19:20:26 +0200
Hi, I tried sometimes to compile Xbase++ C API samples and
Ot4Cb by Pablo Botella, but without success.

So I'm here to ask for help.

My doubts are:

- which version of C/C++ can I use?
- There are a free version and from where can I download it?
- How can I set the environment.

I'm searching for the lighter possible solution so, no IDE or
so on but only command line utilities and better if portable
as a folder.

A brief tutorial will be very appreciated.

Thanks

Claudio
Matej JuracRe: C/C++ compiling tutorial
on Mon, 12 Sep 2022 07:55:56 +0200
Might be Visual c++ R 9.0 ( 2008 ) at least what is says in in ot4xb\source\ot4xb.vcproj and some other files ( present in that directory. It imho indicates ot4xb is developed with Visual Studio R2008 .

So a 32bit MS C compiler might be good start. You can get it as part of community releases of Ms Visual Studio for free, just needs registration

With first open you will be prompted by VS to upgrade sln/vcproj files to recent format and confirm it.





Claudio Driussi <claudio.driussi@libero.it> wrote in message news:64dcb7e6$2e9a5ca0$b1778@news.alaska-software.com...
>Hi, I tried sometimes to compile Xbase++ C API samples and
>Ot4Cb by Pablo Botella, but without success.
>
>So I'm here to ask for help.cmd

>
>My doubts are:
>
>- which version of C/C++ can I use?
>- There are a free version and from where can I download it?
>- How can I set the environment.
>
>I'm searching for the lighter possible solution so, no IDE or
>so on but only command line utilities and better if portable
>as a folder.
>
>A brief tutorial will be very appreciated.
>
>Thanks
>
>Claudio
Osvaldo RamirezRe: C/C++ compiling tutorial
on Mon, 12 Sep 2022 15:40:16 -0600
On 09/09/22 11:20, Claudio Driussi wrote:
> Hi, I tried sometimes to compile Xbase++ C API samples and
> Ot4Cb by Pablo Botella, but without success.
> 
> So I'm here to ask for help.
> 
> My doubts are:
> 
> - which version of C/C++ can I use?
> - There are a free version and from where can I download it?
> - How can I set the environment.
> 
> I'm searching for the lighter possible solution so, no IDE or
> so on but only command line utilities and better if portable
> as a folder.
> 
> A brief tutorial will be very appreciated.
> 
> Thanks
> 
> Claudio

Hello Claudio

I dont know if it help ...

I am not a C++ guro, but I am creating some activex with VisualStudio 2019.

This is my setup.bat

@echo off
rem Environment for Xbase++
call "C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
SET XPPROOT=C:\language\alaska\xppw32.20\xpp20
SET LIB=C:\language\alaska\xppw32.20\xpp20\LIB;%lib%
SET 
PATH=C:\language\alaska\xppw32.20\xpp20\BIN;C:\language\alaska\xppw32.20\xpp20\LIB;%path%
SET INCLUDE=C:\language\alaska\xppw32.20\xpp20\INCLUDE;%include%
SET 
XPPRESOURCE=C:\language\alaska\xppw32.20\xpp20\RESOURCE\BITMAP;C:\language\alaska\xppw32.20\xpp20\RESOURCE\ICON;C:\language\alaska\xppw32.20\xpp20\RESOURCE\FONT;C:\language\alaska\xppw32.20\xpp20\RESOURCE\POINTER;

Osvaldo Ramirez
Claudio Driussi Re: C/C++ compiling tutorial
on Tue, 13 Sep 2022 11:40:49 +0200
Many thanks Matej and Osvaldo

I will try...

Il 09/09/22 19:20, Claudio Driussi ha scritto:
> Hi, I tried sometimes to compile Xbase++ C API samples and
> Ot4Cb by Pablo Botella, but without success.
> 
> So I'm here to ask for help.
> 
> My doubts are:
> 
> - which version of C/C++ can I use?
> - There are a free version and from where can I download it?
> - How can I set the environment.
> 
> I'm searching for the lighter possible solution so, no IDE or
> so on but only command line utilities and better if portable
> as a folder.
> 
> A brief tutorial will be very appreciated.
> 
> Thanks
> 
> Claudio
Osvaldo RamirezRe: C/C++ compiling tutorial
on Tue, 13 Sep 2022 20:17:46 -0600
On 13/09/22 3:40, Claudio Driussi wrote:
> Many thanks Matej and Osvaldo
> 
> I will try...
> 
> Il 09/09/22 19:20, Claudio Driussi ha scritto:
>> Hi, I tried sometimes to compile Xbase++ C API samples and
>> Ot4Cb by Pablo Botella, but without success.
>>
>> So I'm here to ask for help.
>>
>> My doubts are:
>>
>> - which version of C/C++ can I use?
>> - There are a free version and from where can I download it?
>> - How can I set the environment.
>>
>> I'm searching for the lighter possible solution so, no IDE or
>> so on but only command line utilities and better if portable
>> as a folder.
>>
>> A brief tutorial will be very appreciated.
>>
>> Thanks
>>
>> Claudio
> 
To compile and link use nmake.exe, I dont know how to use pbuild to 
compile/link c++/c files

Regards
Osvaldo
Matej JuracRe: C/C++ compiling tutorial
on Wed, 14 Sep 2022 07:58:38 +0200
Right!

nmake -f  is the proper way , nmake .mak file can call cl, xpp and alink 

I checked xbase capi samples (shipped with distribution) and they were not updated since 2002. Still contain OS/2 references , mak file has hardcoded directories to compiler and includes

Readme.txt is from 1998.

Win32: MicrosoftVisual-C++ Version 4.0. 
OS/2:  IBM VisualAge for C++ 3.0


Probably they compile it with MS C 2008 , but even to get installer for that one, you have to rely on certain seaside bay with strong currents.

Must check some other forums (donnay webboard and xbaseforum.de) if there is more information there

but it is start


Osvaldo Ramirez wrote in message news:74ed7530$f901e04$bb0af@news.alaska-software.com...
>On 13/09/22 3:40, Claudio Driussi wrote:
>> Many thanks Matej and Osvaldo
>> 
>> I will try...
>> 
>> Il 09/09/22 19:20, Claudio Driussi ha scritto:
>>> Hi, I tried sometimes to compile Xbase++ C API samples and
>>> Ot4Cb by Pablo Botella, but without success.
>>>
>>> So I'm here to ask for help.
>>>
>>> My doubts are:
>>>
>>> - which version of C/C++ can I use?
>>> - There are a free version and from where can I download it?
>>> - How can I set the environment.
>>>
>>> I'm searching for the lighter possible solution so, no IDE or
>>> so on but only command line utilities and better if portable
>>> as a folder.
>>>
>>> A brief tutorial will be very appreciated.
>>>
>>> Thanks
>>>
>>> Claudio
>> 
>To compile and link use nmake.exe, I dont know how to use pbuild to 
>compile/link c++/c files
>
>Regards
>Osvaldo
Matej JuracRe: C/C++ compiling tutorial
on Wed, 14 Sep 2022 08:40:48 +0200
"Good news everyone" Dpt.

I managed to compile and link capi samples with  Microsoft C/C++ Version 19 (from 2015) with modified .mak file with changed compile switches, paths to x86 compiler, 

generally it is:

1.) needs: environment for xbase compiler and linker in PATH, include, etc

2) Osvaldo Ramizez provided info: call to setup ms vc x86 environment as: "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86

  (see x86 as parameter at end, substitute 14.0 with appropriate direcoty depending on visual studio release)

3) some of _mem* functions are since 2015 moved to vcruntime.lib and libucrt.lib so we add vcruntime.lib to .mak file

4) add cl switch /GS- is to DISABLE security checks (it is enabled by default but produces security cookie linker errors)


usage: "nmake -f capi.mak"

And it produces working main.exe and sound.exe

(and a warning about 'cl : Command line warning D9035 : option 'O' has been deprecated and will be removed in a future release' )


modified make file in attachment


Todo: install current visual studio community with latest Ms C and try recomping capi samples
Todo: run recompile for ot4xb 




Matej Jurac wrote in message news:4fe6a288$6fb146d0$ba80c@news.alaska-software.com...
>Right!
>
>nmake -f  is the proper way , nmake .mak file can call cl, xpp and alink 
>
>I checked xbase capi samples (shipped with distribution) and they were not updated since 2002. Still contain OS/2 references , mak file has hardcoded directories to compiler and includes
>
>Readme.txt is from 1998.
>
>Win32: MicrosoftVisual-C++ Version 4.0. 
>OS/2:  IBM VisualAge for C++ 3.0
>
>
>Probably they compile it with MS C 2008 , but even to get installer for that one, you have to rely on certain seaside bay with strong currents.
>
>Must check some other forums (donnay webboard and xbaseforum.de) if there is more information there
>
>but it is start
>
>
>Osvaldo Ramirez wrote in message news:74ed7530$f901e04$bb0af@news.alaska-software.com...
>>On 13/09/22 3:40, Claudio Driussi wrote:
>>> Many thanks Matej and Osvaldo
>>> 
>>> I will try...
>>> 
>>> Il 09/09/22 19:20, Claudio Driussi ha scritto:
>>>> Hi, I tried sometimes to compile Xbase++ C API samples and
>>>> Ot4Cb by Pablo Botella, but without success.
>>>>
>>>> So I'm here to ask for help.
>>>>
>>>> My doubts are:
>>>>
>>>> - which version of C/C++ can I use?
>>>> - There are a free version and from where can I download it?
>>>> - How can I set the environment.
>>>>
>>>> I'm searching for the lighter possible solution so, no IDE or
>>>> so on but only command line utilities and better if portable
>>>> as a folder.
>>>>
>>>> A brief tutorial will be very appreciated.
>>>>
>>>> Thanks
>>>>
>>>> Claudio
>>> 
>>To compile and link use nmake.exe, I dont know how to use pbuild to 
>>compile/link c++/c files
>>
>>Regards
>>Osvaldo



capi.mak
Osvaldo RamirezRe: C/C++ compiling tutorial
on Wed, 14 Sep 2022 09:58:38 -0600
On 14/09/22 0:40, Matej Jurac wrote:
> "Good news everyone" Dpt.
> 
> I managed to compile and link capi samples with  Microsoft C/C++ Version 19 (from 2015) with modified .mak file with changed compile switches, paths to x86 compiler,
> 
> generally it is:
> 
> 1.) needs: environment for xbase compiler and linker in PATH, include, etc
> 
> 2) Osvaldo Ramizez provided info: call to setup ms vc x86 environment as: "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
> 
>    (see x86 as parameter at end, substitute 14.0 with appropriate direcoty depending on visual studio release)
> 
> 3) some of _mem* functions are since 2015 moved to vcruntime.lib and libucrt.lib so we add vcruntime.lib to .mak file
> 
> 4) add cl switch /GS- is to DISABLE security checks (it is enabled by default but produces security cookie linker errors)
> 
> 
> usage: "nmake -f capi.mak"
> 
> And it produces working main.exe and sound.exe
> 
> (and a warning about 'cl : Command line warning D9035 : option 'O' has been deprecated and will be removed in a future release' )
> 
> 
> modified make file in attachment
> 
> 
> Todo: install current visual studio community with latest Ms C and try recomping capi samples
> Todo: run recompile for ot4xb
> 
> 
> 
> 
> Matej Jurac wrote in message news:4fe6a288$6fb146d0$ba80c@news.alaska-software.com...
>> Right!
>>
>> nmake -f  is the proper way , nmake .mak file can call cl, xpp and alink
>>
>> I checked xbase capi samples (shipped with distribution) and they were not updated since 2002. Still contain OS/2 references , mak file has hardcoded directories to compiler and includes
>>
>> Readme.txt is from 1998.
>>
>> Win32: MicrosoftVisual-C++ Version 4.0.
>> OS/2:  IBM VisualAge for C++ 3.0
>>
>>
>> Probably they compile it with MS C 2008 , but even to get installer for that one, you have to rely on certain seaside bay with strong currents.
>>
>> Must check some other forums (donnay webboard and xbaseforum.de) if there is more information there
>>
>> but it is start
>>
>>
>> Osvaldo Ramirez wrote in message news:74ed7530$f901e04$bb0af@news.alaska-software.com...
>>> On 13/09/22 3:40, Claudio Driussi wrote:
>>>> Many thanks Matej and Osvaldo
>>>>
>>>> I will try...
>>>>
>>>> Il 09/09/22 19:20, Claudio Driussi ha scritto:
>>>>> Hi, I tried sometimes to compile Xbase++ C API samples and
>>>>> Ot4Cb by Pablo Botella, but without success.
>>>>>
>>>>> So I'm here to ask for help.
>>>>>
>>>>> My doubts are:
>>>>>
>>>>> - which version of C/C++ can I use?
>>>>> - There are a free version and from where can I download it?
>>>>> - How can I set the environment.
>>>>>
>>>>> I'm searching for the lighter possible solution so, no IDE or
>>>>> so on but only command line utilities and better if portable
>>>>> as a folder.
>>>>>
>>>>> A brief tutorial will be very appreciated.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Claudio
>>>>
>>> To compile and link use nmake.exe, I dont know how to use pbuild to
>>> compile/link c++/c files
>>>
>>> Regards
>>> Osvaldo
> 
> begin 666 capi.mak
> M(PT*(R!-86ME9FEL92!F;W(@97AT96YD('-Y<W1E;2`H0RU!4$DI(&5X86UP
> M;&5S(`T*(PT*(R!297%U:7)E;65N=',Z#0HC("T@16YV:7)O;FUE;G0@=F%R
> M:6%B;&4@24Y#3%5$12!C;VYT86EN<R!P871H(&9O<B!88F%S92LK(&AE861E
> M<B!F:6QE<PT*(R`M($5N=FER;VYM96YT('9A<FEA8FQE($Q)0B!C;VYT86EN
> M<R!P871H(&9O<B!X<'!R=#$N;&EB(&%N9"!#(&QI8G)A<FEE<PT*(R`M($5N
> M=FER;VYM96YT('9A<FEA8FQE(%A04%)%4T]54D-%(&-O;G1A:6YS('!A=&@@
> M9F]R('AP<')T,2YR97,-"B,-"B,@0RU#;VUP:6QE<CH@35,@5FES=6%L($,K
> M*PT*(PT*(R!#;W!Y<FEG:'0@*$,I(#$Y.34M,C`P,"P@06QA<VMA(%-O9G1W
> M87)E#0HC($%L;"!2:6=H=',@4F5S97)V960-"B,-"B,@,C`R,BTP.2`-"B,@
> M("`@("T@;6]D:69I960@9F]R($UI8W)O<V]F="`H4BD@0R]#*RL@3W!T:6UI
> M>FEN9R!#;VUP:6QE<B!697)S:6]N(#$Y+C`P+C(T,C$U+C$@9F]R('@X-@T*
> M(R`@("`@+2!N965D<SH@96YV:7)O;FUE;G0@9F]R('AB87-E(&-O;7!I;&5R
> M(&%N9"!L:6YK97(-"B,@("`@("T@8V%L;"!T;R!S971U<"!M<R!V8R!E;G9I
> M<F]N;65N="!A<SH@(F,Z7%!R;V=R86T@1FEL97,@*'@X-BE<36EC<F]S;V9T
> M(%9I<W5A;"!3='5D:6\@,30N,%Q60UQV8W9A<G-A;&PN8F%T(B!X.#8-"B,@
> M("`@("`@*'-E92!X.#8@87,@<&%R86UE=&5R(&%T(&5N9"P@<W5B<W1I='5T
> M92`Q-"XP('=I=&@@87!P<F]P<FEA=&4@9&ER96-O='DI#0HC("`@("`M('-O
> M;64@;V8@7VUE;2H@9G5N8W1I;VYS(&%R92!S:6YC92`R,#$U(&UO=F5D('1O
> M('9C<G5N=&EM92YL:6(@86YD(&QI8G5C<G0N;&EB('-O('=E(&%D9"!V8W)U
> M;G1I;64N;&EB('1O(&UI>`T*(R`@("`@+2`O1U,M(&ES('1O($1)4T%"3$4@
> M<V5C=7)I='D@8VAE8VMS("AI="!I<R!E;F%B;&5D(&)Y(&1E9F%U;'0@8G5T
> M('!R;V1U8V5S('-E8W5R:71Y(&-O;VMI92!L:6YK97(@97)R;W)S*0T*(R`@
> M("`@+2!U<V%G93H@(FYM86ME("UF(&-A<&DN;6%K(@T*#0I80T]-4$E,13TO
> M8B]Q#0HA:69D968@5TE.1$E2#0HC;W)I9VEN86P-"B-#0T]-4$E,13TO6FP@
> M+TDD*$U31$561$E2*5Q)3D-,541%("]C("]48R`-"D-#3TU024Q%/2]:;"`O
> M8R`O5&,@#0HC;W)I9VEN86P-"B-#0STD*$U31$561$E2*5QB:6Y<8VP@+T1?
> M7U3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