Author Topic: Use of Open Watcom Compiler on Linux (Mint Vanessa 20.3)  (Read 1450 times)

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 21
Use of Open Watcom Compiler on Linux (Mint Vanessa 20.3)
« on: December 29, 2023, 06:27:42 pm »
Hi,

I try to use OW compiler into C::B IDE on Linux.
In attachment, the result of this test (succesfull).

After this test four questions at C::B Teams :
    "Why "options" by default like "-Wall" "/Zi" appears on command line to compile after create new configuration
   of compiler on Linux ?"
   "Why "Other compiler options" are not used when positioned in project properties on Linux ?"
   "Why "Other compiler options" are not used when positioned in global settings of compiler on Linux ?"
   "Can you integrate Open Watcom compiler directly into IDE on Linux and when ?"

Many thanks.

Thierry D.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Use of Open Watcom Compiler on Linux (Mint Vanessa 20.3)
« Reply #1 on: December 29, 2023, 07:44:25 pm »
Why did you clone the Intel compiler? Modify the Watcom one or clone it.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Use of Open Watcom Compiler on Linux (Mint Vanessa 20.3)
« Reply #2 on: December 29, 2023, 10:43:39 pm »
Why did you clone the Intel compiler? Modify the Watcom one or clone it.

Some compilers are only on some OSes. Open Watcom  (OW) might be one of them.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 21
Response TDE : Use of Open Watcom Compiler on Linux (Mint Vanessa 20.3)
« Reply #3 on: December 30, 2023, 11:57:34 am »
Hi Miguel,

Sorry, but OW is not proposed in list of "available" compilers on Linux (but true, on Windows systems)...

Greeting.

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 21
Use of Open Watcom Compiler on Linux (Mint Victoria 20.3)
« Reply #4 on: Today at 04:23:12 pm »
Hi,

I continue to test this compiler on Linux. It seems "enougth stable" same with V2 always in work on GitHub : https://github.com/open-watcom/open-watcom-v2/releases/tag/Current-build
I install last "stable build" with sample command : "sudo ./open-watcom-2_0-c-linux-x64".
Result : directory installation in /usr/bin/watcom (under this directory many sub-directories, only "binl" or "binl64" used directly on Linux, version 32 bits or 64 bits of tools)
After tests (without CB, because syntax are not recognize ...) results are :
  construct OK with two lines, compilation and then linkage (initial PATH : "export PATH=/usr/bin/watcom/binl:$PATH")
         wcc386 hello.c -ecc -bt=linux -i=/usr/bin/watcom/lh -d2 -dDEBUG -d_DEBUG -fo=objOW32/Debug/hello.o
         wlink debug watcom file objOW32/Debug/hello.o name binOW32/Debug/hello.exe  form ELF run LIN LIBP /usr/bin/watcom/lib386/linux LIBP /usr/bin/watcom/lib386
  construct OK with two lines, compilation and then linkage (after change $PATH : "export PATH=/usr/bin/watcom/binl64:$PATH") :
        wcc386 hello.c -ecc -bt=linux -i=/usr/bin/watcom/lh -d2 -dDEBUG -d_DEBUG -fo=objOW64/Debug/hello.o
        wlink debug watcom file objOW64/Debug/hello.o name binOW64/Debug/hello.exe form ELF run LIN LIBP /usr/bin/watcom/lib386/linux LIBP /usr/bin/watcom/lib386
  construct OK with two lines, compilation and then linkage (initial PATH : "export PATH=/usr/bin/watcom/binl:$PATH")
        wcc386 hello.c -ecc -bt=linux -i=/usr/bin/watcom/lh -d0 -dNDEBUG -fo=objOW32/Release/hello.o
        wlink file objOW32/Release/hello.o name binOW32/Release/hello.exe  form ELF run LIN LIBP /usr/bin/watcom/lib386/linux LIBP /usr/bin/watcom/lib386
  construct OK with two lines, compilation and then linkage (after change $PATH : "export PATH=/usr/bin/watcom/binl64:$PATH") :
         wcc386 hello.c -ecc -bt=linux -i=/usr/bin/watcom/lh -d0 -dNDEBUG -fo=objOW64/Release/hello.o
        wlink file objOW64/Release/hello.o name binOW64/Release/hello.exe  form ELF run LIN LIBP /usr/bin/watcom/lib386/linux LIBP /usr/bin/watcom/lib386
 
WARNING : Open Watcom compiler don't generate 64 bits ELF on Linux, same with use of directory /usr/bin/watcom/binl64 in PATH.
  That is irrelevant, and compromize use of version 64 bits of these compiler. Nothing interest to test 64 bits ... same behavior on Windows system !!!

NB : Option "-ecc" during compilation, because by default OW use  special calling convention (__watcall), then "-ecc" force calling convention to __cdecl most compatible.

Syntax and list of options of these two commands in joined files.

Is it difficult to integrate OW into CB on Linux (by discover during first run by example) ?

Thank's

Thierry D.