Hi all,
Or here http://wiki.wxwidgets.org/wiki.pl?CodeBlocks_Setup_Guide
ok, the guide says (I am using cygwin for compilation)
cd %WXWIN%\build\msw
make -f makefile.gcc clean
and I get bunch of error like
ivica@none-vzk04m85es /cygdrive/c/wx/wxWidgets/2.6.0/build/msw
$ make -f makefile.gcc clean
if exist gcc_mswd\*.o del gcc_mswd\*.o
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_lib\libwxregexd.a del ..\..\lib\gcc_lib\libwxregexd.a
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_lib\libwxzlibd.a del ..\..\lib\gcc_lib\libwxzlibd.a
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_lib\libwxpngd.a del ..\..\lib\gcc_lib\libwxpngd.a
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_lib\libwxjpegd.a del ..\..\lib\gcc_lib\libwxjpegd.a
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
....
Never mind, I clean all libs by hand from previous compilation. Then goes next command
make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb
end I get next output
ivica@none-vzk04m85es /cygdrive/c/wx/wxWidgets/2.6.0/build/msw
$ make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
VENDOR=cb
if not exist gcc_mswdll mkdir gcc_mswdll
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: [gcc_mswdll] Error 2 (ignored)
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [..\..\lib\gcc_dll] Error 2
what now? Seems that my bash shell from cygwin don't understand default makefile from wxWidgets.
However, I have already recommended you to compile wxWidgets from the makefiles and not from C::B, you should try.
I never try to compile wxWidgets from C::B. I compiled wxWidgets 2.6.0 with MS Visual Studio 7.1 and also with cygwin. With MS I didn't have any problem, but with cygwin I had. The default makefile that ships with wxWidgets wont work with my bash shell from cygwin, see above. But it worked with combination (this is from INSTALL-MSW.txt from wxWidgets)
$../configure --with-msw --enable-debug --enable-debug_gdb –disable-shared
$make
Then I compiled minimal sample from sample dir of wxWidgets and it worked, I have got windows with to menu button. So everything went ok.
Then I made default wxWidgets application in C::B, I have set include directories for GCC compiler like
C:\wx\wxWidgets\2.6.0\include
C:\wx\wxWidgets\2.6.0\lib\gcc_lib\mswd
added link dir
C:\wx\wxWidgets\2.6.0\lib\gcc_lib
and added link libraries
libwx_based-2.6
libwx_core-2.6
and get errors from my previous post.
Well inspired;) with text from
http://wiki.wxwidgets.org/wiki.pl?CodeBlocks_Setup_Guide I tried next, from mine cygwin:
$ ../configure --with-msw --enable-xrc --enable-shared --enable-monolithic --en
able-vendor=CB
I didn't find switch for disabling debug, well...
Next I did $make and I've get next libs
libwxjpegd-2.6.a
libwxpngd-2.6.a
libwxtiffd-2.6.a
libwx_mswd-2.6.dll.a
libwx_mswd_stc-2.6.dll.a (yes, I've also compiled stc)
wxmsw26d_gcc_cb.dll
wxmsw26d_stc_gcc_cb.dll
I opened C::B, started a new wxWidgets project, with project options – Using wxWidgets DLL. Compiled and linked, and surprise, everything went ok except 4 warnings
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\TEMP\wxWidgets3\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
In file included from C:/wx/wxWidgets/2.6.0/include/wx/wxchar.h:152,
from C:/wx/wxWidgets/2.6.0/include/wx/debug.h:22,
from C:/wx/wxWidgets/2.6.0/include/wx/defs.h:450,
from C:/wx/wxWidgets/2.6.0/include/wx/wxprec.h:13,
from app.h:4,
from main.h:4,
from main.cpp:1:
C:/Program Files/CodeBlocks/include/tchar.h:274:1: warning: "_puttchar" redefined
In file included from C:/wx/wxWidgets/2.6.0/include/wx/platform.h:545,
from C:/wx/wxWidgets/2.6.0/include/wx/defs.h:21,
from C:/wx/wxWidgets/2.6.0/include/wx/wxprec.h:13,
from app.h:4,
from main.h:4,
from main.cpp:1:
C:/wx/wxWidgets/2.6.0/include/wx/msw/gccpriv.h:108:1: warning: this is the location of the previous definition
Compiling: app.cpp
In file included from C:/wx/wxWidgets/2.6.0/include/wx/wxchar.h:152,
from C:/wx/wxWidgets/2.6.0/include/wx/debug.h:22,
from C:/wx/wxWidgets/2.6.0/include/wx/defs.h:450,
from C:/wx/wxWidgets/2.6.0/include/wx/wxprec.h:13,
from app.h:4,
from app.cpp:1:
C:/Program Files/CodeBlocks/include/tchar.h:274:1: warning: "_puttchar" redefined
In file included from C:/wx/wxWidgets/2.6.0/include/wx/platform.h:545,
from C:/wx/wxWidgets/2.6.0/include/wx/defs.h:21,
from C:/wx/wxWidgets/2.6.0/include/wx/wxprec.h:13,
from app.h:4,
from app.cpp:1:
C:/wx/wxWidgets/2.6.0/include/wx/msw/gccpriv.h:108:1: warning: this is the location of the previous definition
Linking executable: C:\TEMP\wxWidgets3\wxWidgets.exe
Process terminated with status 0 (0 minutes, 21 seconds)
0 errors, 4 warnings
What a hell, I can live with that:))
So I hit run and my application complained about 4 missing dll's:
wxmsw26d_gcc_cb.dll
cygwin1.dll
cygexpat-0.dll
cygz.dll
I've copied those dll's to dir where my wxWidgets application is, and hit run again. This time a windows pop up saying “wxWidgets.exe has encountered a problem and needs to close. We are sorry for the inconvenience.“
Really no ideas, what to do next.