I try to use Open Watcom with C::B and have some problems with it.
1. I can't specify path of the libs for the linker. wcl386.exe uses wlink directive for it. It's look like:
wcl386.exe -"LIBPath <path> ..."
where <path> - it is my path for libs. In C::B I can't specify that directive in Settings->Compiler...->Other->Advanced Options->Others, cause path must be in quotes. If I write some like -"LIBPath", than command will be like: wcl386.exe -"LIBPath"c:\bla\bla... - that is incorrect.
Another way. If I write directly in linker field in commands tab -"LIBPath $libdirs", that will be also incorrect, cause all paths in that directive must delimited by ";", not by space as in C::B.
How can I resolve this problem?
2. I can't link resource file to exe. wcl386.exe writes that it unknown object file. I try to use wrc.exe with -zm option for Microsoft .res compatible file, but it also not work. So, what to do?
3. How can I specify PCH file for the project? I try to use -fh option with specify "watcom.pch" file, but while compiling, this file was recreated for every cpp file in the project.
Who can help me with my problems?
imho, some errors in c::b code:
compilerOW.cpp
52: m_Programs.MAKE = wxT("mingw32-make.exe"); // need "wmake.exe"?
...
55: m_Switches.libDirs = wxT("-L"); // it's not watcom option
...
341: m_RegExes.Add(RegExStruct(_("Note"), cltError, wxT("([A-Za-z0-9_:/\\.-]+)\\(([0-9]+)\\): Note! (.+)"), 3, 1, 2)); // must be cltInfo instead of cltError
p.s. sorry for "nice" English :)
project (or you can even put on compiler level) : Directories tab (or Linker tab maybe for other settins)
and what? of course, I write my paths here, but full command line looks like:
wcl386.exe -LC:\wxWidgets\lib\wat_dll -LC:\wxWidgets\lib -L..\..\lib -LC:\watcom\lib
It's incorrect, cause "-L" - is key for gcc, not for watcom.
@madnut.ua
I have the changes ready to commit, but you will have to manually adjust your defaul.conf anyway, unless you delete it [otherwise the changes in the CB soures won't have any effect].
Change this in your default.conf to try out, to see if it works (note nothing to do with wx wizard !!) :
- look for <ow>
- then the subtag <Make> and change from :
<MAKE>
<str>
<![CDATA[mingw32-make.exe]]>
</str>
</MAKE>
to
<MAKE>
<str>
<![CDATA[wmake.exe]]>
</str>
</MAKE>
then look for the subtag(s) : <switches> <LIBS>
and change from :
<LIBS>
<str>
<![CDATA[-L]]>
</str>
</LIBS>
to
<LIBS>
<str>
<![CDATA[-LIBpath]]>
</str>
</LIBS>
and finally look for <regex><re001> and change from
to
that last one will change it to cltNormal, we don't have cltInfo, so not sure if this will have the desired effect
Please provide a simple line of code that will trigger a *note*. According to the dropdown box the "Info" should map to cltNormal.
Please provide us with your feedback, so I can commit this evening the fixed code.
EDIT : Make sure all cb instances are closed when you make this changes !
Thanks all for help! :)
@madnut.ua
Please provide us with your feedback, so I can commit this evening the fixed code.
I already change it before.
But -libpath not work, as I write before.
If the name of a library file appearing in a "LIBRARY" directive or the the name of an object
file appearing in a "LIBFILE" directive contains a path specification, only the specified path
will be searched.
Note that
libpath path1
libpath path2
is equivalent to the following.
libpath path2;path1
It's docs for wlink.exe. For wcl386.exe directive must be in quotes: -"libpath path1" or -"libpath path1;path2"
C:\WATCOM\binnt>wcl386.exe
Open Watcom C/C++32 Compile and Link Utility Version 1.6
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
Usage: wcl386 [options] file(s)
Options: ( /option is also accepted )
....
....
[Linker options]
-bd build Dynamic link library -fm[=<map_file>] generate map file
-bm build Multi-thread application -k<stack_size> set stack size
-br build with dll run-time library -l=<os> link for the specified OS
-bw build default Windowing app. -x make names case sensitive
-bcl=<os> compile and link for OS. @<file> additional directive file
-fd[=<file>[.lnk]] write directives -"<linker directives>"
-fe=<executable> name executable file
See -"<linker directives>"
wcl386.exe translate this line to wlink for parsing. so it must be in quotes. Else I get error, cause wcl386.exe parse it as "-l=<os> link for the specified OS".
Here my full command line:
-------------- Build: cdc_u_release_dll_28_watcom in cdc ---------------
Skipping file (no compiler program set): ..\..\src\wx_pch.h
wcl386.exe -q -LIBpathC:\wxWidgets\lib\wat_dll -LIBpathC:\wxWidgets\lib -LIBpath..\..\lib -LIBpathC:\watcom\lib
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\CCrypter\crypter.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\DES\des.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\app.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\wx_pch.obj
...
...
-fe=..\..\..\bin\cb_unicode_release_dll_watcom\cdc.exe wxmsw28u_html.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxbase28u.lib sqlite3.lib ..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\res\cdc.obj
Warning! W1107: file __wcl__.lnk: line(2): undefined system name: IBpathC:\watcom\lib
Error! E3146: ..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\res\cdc.obj is an invalid object file
Error: Linker returned a bad status
Process terminated with status 1 (0 minutes, 6 seconds)
0 errors, 0 warnings
if I remove .res file form link process:
was
$linker -q $link_options $libdirs $link_objects -fe=$exe_output $libs $link_resobjects
to
$linker -q $link_options $libdirs $link_objects -fe=$exe_output $libs
I got:
-------------- Build: cdc_u_release_dll_28_watcom in cdc ---------------
Skipping file (no compiler program set): ..\..\src\wx_pch.h
wcl386.exe -q -libpathC:\wxWidgets\lib\wat_dll -libpathC:\wxWidgets\lib -libpath..\..\lib -libpathC:\watcom\lib
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\CCrypter\crypter.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\DES\des.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\app.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\wx_pch.obj
...
...
-fe=..\..\..\bin\cb_unicode_release_dll_watcom\cdc.exe wxmsw28u_html.lib wxbase28u_xml.lib wxmsw28u_adv.lib wxmsw28u_core.lib wxbase28u.lib sqlite3.lib
Warning! W1107: file __wcl__.lnk: line(2): undefined system name: ibpathC:\watcom\lib
Warning! W1008: cannot open wxmsw28u_html.lib : No such file or directory
Warning! W1008: cannot open wxbase28u_xml.lib : No such file or directory
Warning! W1008: cannot open wxmsw28u_adv.lib : No such file or directory
Warning! W1008: cannot open wxmsw28u_core.lib : No such file or directory
Warning! W1008: cannot open wxbase28u.lib : No such file or directory
Warning! W1008: cannot open sqlite3.lib : No such file or directory
Error! E2028: near wxHtmlWindow::~wxHtmlWindow() is an undefined reference
Error! E2028: void near wxHtmlWindow::SetHTMLWindowTitle( wxString const near & ) is an undefined reference
Error! E2028: void near wxHtmlWindow::OnHTMLLinkClicked( wxHtmlLinkInfo const near & ) is an undefined reference
Error! E2028: wxHtmlOpeningStatus near wxHtmlWindow::OnHTMLOpeningURL( wxHtmlURLType, wxString const near &, wxString near * ) const is an undefined reference
Error! E2028: wxPoint near wxHtmlWindow::HTMLCoordsToWindow( wxHtmlCell near *, wxPoint const near & ) const is an undefined reference
Error! E2028: wxWindow near * near wxHtmlWindow::GetHTMLWindow() is an undefined reference
Error! E2028: wxColour near wxHtmlWindow::GetHTMLBackgroundColour() const is an undefined reference
Error! E2028: void near wxHtmlWindow::SetHTMLBackgroundColour( wxColour const near & ) is an undefined reference
Error! E2028: void near wxHtmlWindow::SetHTMLBackgroundImage( wxBitmap const near & ) is an undefined reference
Error! E2028: void near wxHtmlWindow::SetHTMLStatusText( wxString const near & ) is an undefined reference
Error! E2028: wxCursor near wxHtmlWindow::GetHTMLCursor( wxHtmlWindowInterface::HTMLCursor ) const is an undefined reference
Error! E2028: ___wcpp_4_fs_handler_ is an undefined reference
Error! E2028: near wxWindowBase::wxWindowBase() is an undefined reference
Error! E2028: void near wxWindow::Init() is an undefined reference
Error! E2028: near wxBaseArrayLong::wxBaseArrayLong() is an undefined reference
...
...
If I write full path for .lib files I've got:
-------------- Build: cdc_u_release_dll_28_watcom in cdc ---------------
Skipping file (no compiler program set): ..\..\src\wx_pch.h
wcl386.exe -q -libpathC:\wxWidgets\lib\wat_dll -libpathC:\wxWidgets\lib -libpath..\..\lib -libpathC:\watcom\lib
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\CCrypter\crypter.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\DES\des.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\app.obj
..\..\..\bin\cb_unicode_release_dll_watcom\.objs\src\wx_pch.obj
...
...
-fe=..\..\..\bin\cb_unicode_release_dll_watcom\cdc.exe C:\wxWidgets\lib\wat_dll\wxmsw28u_html.lib C:\wxWidgets\lib\wat_dll\wxbase28u_xml.lib C:\wxWidgets\lib\wat_dll\wxmsw28u_adv.lib C:\wxWidgets\lib\wat_dll\wxmsw28u_core.lib C:\wxWidgets\lib\wat_dll\wxbase28u.lib ..\..\lib\sqlite3.lib
Warning! W1107: file __wcl__.lnk: line(2): undefined system name: ibpathC:\watcom\lib
Error! E2028: ___wcpp_4_fs_handler_ is an undefined reference
Error! E2028: __wcpp_4_dtor_array_store__ is an undefined reference
Error! E2028: void near operator delete []( void near * ) is an undefined reference
Error! E2028: void near operator delete( void near * ) is an undefined reference
Error! E2028: __imp_free_ is an undefined reference
Error! E2028: __imp_wcslen_ is an undefined reference
Error! E2028: void near * near operator new( int unsigned ) is an undefined reference
Error! E2028: __imp_realloc_ is an undefined reference
Error! E2028: __imp_malloc_ is an undefined reference
Error! E2028: __imp_memset_ is an undefined reference
Error! E2028: __imp__stprintf_ is an undefined reference
Error! E2028: __wcpp_4_pure_error__ is an undefined reference
Error! E2028: __wcpp_4_undefed_cdtor__ is an undefined reference
Error! E2028: __compiled_under_NT is an undefined reference
Error! E2028: __CHK is an undefined reference
Error! E2028: __wcpp_4_lcl_register__ is an undefined reference
Error! E2028: __wcpp_4_destruct_all__ is an undefined reference
Error! E2028: __wcpp_4_destruct__ is an undefined reference
Error! E2028: void near * near operator new []( int unsigned ) is an undefined reference
Error! E2028: __wcpp_4_ctor_array_storage_gs__ is an undefined reference
Error! E2028: __imp_memcpy_ is an undefined reference
Error! E2028: __imp_strlen_ is an undefined reference
Error! E2028: __wcpp_4_rethrow__ is an undefined reference
Error! E2028: _setjmp_ is an undefined reference
...
...
But if I write libs path in Linker tab like: -"libpath C:\watcom\lib",
c::b translate it to command line like: wcl386.exe "-"libpath C:\watcom\lib"" ...
so it doesn't work(