News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[Resolved] Using OpenWatcom compiler in C::B

Started by Eric75000, September 25, 2007, 08:54:10 PM

Previous topic - Next topic

Eric75000

Hello everybody !

First of all, excuse me for my bad english, I'm a little frenchy  :lol:

I'm using C::B 1.0rc2 with OpenWatcom 1.7 compiler (last version)

I'm trying to create a user template on C::B who allows me to use a 32bits program in a DOS extender like DOS4GW. (Yes, I know it's a old method, but it's to learn... :wink: )
I start with the "Console Application" initial template (Files/New Project...) and modify it to use Open Watcom compiler. (Right click on "Console application" in my workspace, Targets, Target's build options, Selected compiler, OpenWatcom (W32) Compiler)

But when i try a Ctrl+F9, it's not the good version of Open Watcom compiler who starts (wcc386.exe instead of wcl386.exe)

Where can I modify this parameters ? (Obtain in Selected compiler something like "OpenWatcom (DOS - 32 bits) Compiler" as OpenWatcom can normaly do)

Can anyone help me, please ?
Thanks in advance !

Bests Regards,
Eric.

Biplab

RC2 is pretty old. Please download a latest nightly from the following link.

Quotehttp://forums.next.codeblocks.org/index.php/board,20.0.html

I'm afraid that even if you change the compiler executable to wcl386.exe it may not work well with RC2. Lately the support of newer OpenWatcom compilers has been enhanced in recent nightlies.

BTW, please note that the Console Wizard will create the Project for Win32 executables (console). In case you want to create a DOS executable, you've to change the appropriate command line option (-bt=dos) in Project > Build options.
Be a part of the solution, not a part of the problem.

Eric75000

Thanks Biplab for your answer ! :D

I'll install the latest nightly this evening like you recommand... (I stayed at RC2 version because in France, in some forums like this one, they do not recommand to use nightly builds... so like I'm a beginner...:mrgreen:)

Quote from: Biplab on September 25, 2007, 09:00:36 PM
BTW, please note that the Console Wizard will create the Project for Win32 executables (console). In case you want to create a DOS executable, you've to change the appropriate command line option (-bt=dos) in Project > Build options.

I'm not sure that the comman line option (-bt=dos) works because in the prog is inserted some ASM instructions (witch use DOS interruptions)
And the prog to work properly must use DOS4GW, and if you use another compiler executable instead of wcl386.exe, it will compile but not work...

I'll try it this evening and tell you...

C U soon,
Eric

Biplab

Quote from: Eric75000 on September 26, 2007, 04:58:39 PM
I'm not sure that the comman line option (-bt=dos) works because in the prog is inserted some ASM instructions (witch use DOS interruptions)
And the prog to work properly must use DOS4GW, and if you use another compiler executable instead of wcl386.exe, it will compile but not work...

I just gave you an example. I wanted to say that in case you want to develop programs for DOS, you'll need to change certain parameters. :)

I hope you'll get a better experience with C::B nightlies as opposed to other forums say. ;)
Be a part of the solution, not a part of the problem.

Eric75000

Hi !

=> Now I'm using C::B Nightly build SVN4491 : what the difference compared to RC2 !!!!  :P
So I've found where I can transmit the "-l=dos4g" command line (Thanks Biplab) to the compiler...
But the prog still doesn't work ! :(

Where can I config more verbose build logs in C::B please ? (only 5 lines in SVN4491 instead of many many lines in RC2)

thomas

Quote from: Eric75000 on September 28, 2007, 12:18:23 PM=> Now I'm using C::B Nightly build SVN4491 : what the difference compared to RC2 !!!!  :P
Basically, everything.

QuoteWhere can I config more verbose build logs in C::B please ? (only 5 lines in SVN4491 instead of many many lines in RC2)
Compiler settings, rightmost tab, select "full command line".
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Eric75000

Thanks Thomas for your answer !

Build logs are a little more verbose but not enough :? : although none compiler flag is set, when I build my prog, I can see in build log "wcl386.exe -q -c..." and after "wlink.exe option quiet..."

=> This is why I can't see all of the logs : -q flag = operate quietly for compiler, and option quiet = quiet (!) for the linker.

Somebody knows please where can I unset this flag ? I search in Settings/Compiler and debugger and in my project properties but I've found nothing !

Biplab

Quote from: Eric75000 on September 28, 2007, 10:17:44 PM
Build logs are a little more verbose but not enough :? : although none compiler flag is set, when I build my prog, I can see in build log "wcl386.exe -q -c..." and after "wlink.exe option quiet..."

=> This is why I can't see all of the logs : -q flag = operate quietly for compiler, and option quiet = quiet (!) for the linker.

Somebody knows please where can I unset this flag ? I search in Settings/Compiler and debugger and in my project properties but I've found nothing !

Don't worry about that difference. That's hard-coded. It won't affect your project.

Unfortunately the command line options of wlink.exe is not same as of other tools, such as wcl386.exe. So option quiet may seem odd to you but it is the option which wlink.exe uses.
Be a part of the solution, not a part of the problem.

Eric75000

Hi !

Sorry for my late answer, I was in holidays...

QuoteIt won't affect your project.
I know, I know !!! :wink:

QuoteThat's hard-coded.
Argh ! It's too bad that you can't set or unset by yourself this flag ! I know this flag ins't very very important, but I was accustomed at the logs of RC2 version :oops:

So, I have another problem : when I want to compile my prog in OpenWatcom with inline command, I must type in a DOS window :
wcl386 /l=dos4g my_starfield.c
I would like to do the same in C::B, so in the build options of my projet, I set the flag "link for the specified OS (define TARGET_OS in custom variables) [-l=[TARGET_OS])" and click "Add" button in the "Custom variables" tabs and type "$(TARGET_OS)" for the key, and "dos4g" for the value...
But, when I build my prog, (F11) I can see in the logs : wcl386.exe -q -c -l= 

The compiler take well the flag but not the custom variable $(TARGET_OS) :(
Where I made a mistake ???

(I hope you understand my very very bad english :oops:)

Biplab

Quote from: Eric75000 on October 03, 2007, 04:12:31 PM
QuoteThat's hard-coded.
Argh ! It's too bad that you can't set or unset by yourself this flag ! I know this flag ins't very very important, but I was accustomed at the logs of RC2 version :oops:

Ok, I'll change this.

Quote from: Eric75000 on October 03, 2007, 04:12:31 PM
So, I have another problem : when I want to compile my prog in OpenWatcom with inline command, I must type in a DOS window :
wcl386 /l=dos4g my_starfield.c
I would like to do the same in C::B, so in the build options of my projet, I set the flag "link for the specified OS (define TARGET_OS in custom variables) [-l=[TARGET_OS])" and click "Add" button in the "Custom variables" tabs and type "$(TARGET_OS)" for the key, and "dos4g" for the value...
But, when I build my prog, (F11) I can see in the logs : wcl386.exe -q -c -l= 

The compiler take well the flag but not the custom variable $(TARGET_OS) :(
Where I made a mistake ???

(I hope you understand my very very bad english :oops:)

This is a bug. Actually not all linker options are mapped to their equivalent wlink.exe command. It needs to be fixed.
Be a part of the solution, not a part of the problem.

Biplab

I've fixed the bug (Not expanding the Custom variables). It's in revision 4505.

Regarding changing the option quiet you can do this. Go to Settings > Compiler & debugger > Other settings. Now click on the Advanced button. There you can change the linker command by editing that line and removing option quiet from that.

If you find any other bugs, please feel free to report it.
Be a part of the solution, not a part of the problem.

Eric75000

Hello everybody !

Biplab : many many thanks to take your precious time to help a little frenchy like me by changing C::B code to allow modifying logs flags in Openwatcom compiler & linker : it's so cool :P
=> I'm now in 4515 revision and, for this, it works like I want !!!! :mrgreen: :mrgreen: :mrgreen:

But for the "custom variables", I must do a mistake (but I don't know where) because it doesn't work :( instead of you've fixed the bug !
It's like exactly the same that previously :
Quotein the build options of my projet, I set the flag "link for the specified OS (define TARGET_OS in custom variables) [-l=[TARGET_OS])" and click "Add" button in the "Custom variables" tabs and type "$(TARGET_OS)" for the key, and "dos4g" for the value...
But, when I build my prog, (F11) I can see in the logs : wcl386.exe -q -c -l=

:cry: :cry: :cry:

Biplab

Quote from: Eric75000 on October 09, 2007, 07:06:56 PM
But for the "custom variables", I must do a mistake (but I don't know where) because it doesn't work :( instead of you've fixed the bug !
It's like exactly the same that previously :
Quotein the build options of my projet, I set the flag "link for the specified OS (define TARGET_OS in custom variables) [-l=[TARGET_OS])" and click "Add" button in the "Custom variables" tabs and type "$(TARGET_OS)" for the key, and "dos4g" for the value...
But, when I build my prog, (F11) I can see in the logs : wcl386.exe -q -c -l=

:cry: :cry: :cry:

I guess you're making some mistakes. This is what happens in my PC. I've used -l=$(TARGET_OS) compiler options and a custom variable TARGET_OS with value nt_win for the project. :)

Quote-------------- Build: Debug in Test ---------------
[ 50.0%] wcl386.exe -q -c -l=nt_win -xs -wx  -d2    -iC:\watcom\h -iC:\watcom\h\nt  -fo=obj\Debug\main.obj main.cpp
[100.0%] wlink.exe option quiet system nt_win debug watcom all  LIBP  C:\watcom\lib386;C:\watcom\lib386\nt file obj\Debug\main.obj name bin\Debug\Test.exe 
Output size is 67.58 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings

You may upload your project file as a zip file so that we may have a look at it.
Be a part of the solution, not a part of the problem.

Eric75000

QuoteYou may upload your project file as a zip file so that we may have a look at it.
Really, you could do that for me ? :D

=> Here are all my [little] projet... (it's to learn how using 13h video mode like old PC 80's demo)

Thanks in advance for your precious help !!!


[attachment deleted by admin]

Eric75000

:cry: No answer :cry:

=> Nobody is interrested more by my prog ???

Biplab ? Sorry but, can U help me please ? :oops: