User forums > Using Code::Blocks

Open Watcom problems\questions

<< < (3/3)

madnut.ua:
Thanks all for help! :)


--- Quote from: killerbot on January 07, 2007, 11:07:30 am ---@madnut.ua

Please provide us with your feedback, so I can commit this evening the fixed code.

--- End quote ---

I already change it before.

But -libpath not work, as I write before.

--- Quote ---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

--- End quote ---

It's docs for wlink.exe. For wcl386.exe directive must be in quotes: -"libpath path1" or -"libpath path1;path2"


--- Code: ---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

--- End code ---

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:

--- Code: ----------------- 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

--- End code ---

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:

--- Code: ----------------- 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
...
...

--- End code ---

If I write full path for .lib files I've got:

--- Code: ----------------- 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
...
...

--- End code ---

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(

killerbot:
what if we specify as program for "Linker for dynamic libs" (no idea what will happen for exe's) : wlink.exe
(For static libs wa also specify wlib.exe) instead of wcl386.exe

Maybe we need an extra program : Linker for executables. ???

[EDIT] For MSVC the link.exe specified for dll's is also used (I guess) for exe's.
[EDIT2] : I think it's better to directly use the wlink instead of the wcl386, those i do all programs that then call other's , pff ;-)

severach:
C::B is a long way off from proper Watcom support. I now build my projects in the Watcom IDE to find out what the proper command lines are and transfer them over to C::B.

Navigation

[0] Message Index

[*] Previous page

Go to full version