IMPORTANT: This first post is now obsolete. Check the latest post for the instructions.
OK. Here's how to build wxWidgets 2.6 + stc under Microsoft Windows™ to use with MINGW32.
(NOTE: Altho Code::Blocks still can't be compiled with this version of wxWidgets, I'm posting this in advance for when it's ready. The wx2.4.2 installation instructions are very similar. They're hidden er located elsewhere in this forum)
1) Download the package (http://www.wxwidgets.org/downld2.htm) from wxwidgets.org and install. I downloaded the zip version and unzipped on a directory.
2) Make sure Your mingw gcc dir ( that's the mingw/bin directory) is in your system path (Right-click My Computer,properties, advanced options,
environment variables).
Note: This version of wxWidgets is designed to work with NATIVE win32 commands. Older versions (like 2.4.2) need the MSYS package to compile.
3) Open a Command window and change to the wxwidgets directory.
Suppose you installed in C:\wxWidgets-2.6.0:
Type:
cd {your-wxwidgets-dir}\build\msw
4)
make -f makefile.gcc SHARED=1 BUILD=release UNICODE=0
Go to dinner, watch TV and play some games while the compilation is done. [ Note: if you can't find a program called "make", try "mingw32-make" ]
5)
cd {your-wxwidgets-dir}\contrib\build\stc
make -f makefile.gcc WXUSINGDLL=1 BUILD=release SHARED=1 UNICODE=0
6)
explorer {your-wxwidgets-dir}\lib\gcc_lib
Copy everything there (subdirectories included) to your MINGW directory
7) Change directory to {your-wxwidgets-dir}\include
Copy everything there (including subdirectories) to your mingw "include" dir. NOTE: If you're still using wxwidgets 2.4.2, I suggest renaming your old "wx" dir to "wx242" so you can restore later.
8) Ta-da! You're ready to compile!
OK here are the *OFFICIAL* instructions. Forget everything I posted previously.
---- (copied from the README-wx2.6.0 that will ship from now on) ---
Now that wxWidgets-2.6.0 is released, work has begun to port Code::Blocks to work with it.
Officialy, Code::Blocks still uses wxWidgets-2.4.2, until all issues from porting it to wxWidgets-2.6.0 are resolved.
KNOWN ISSUES
------------
Win32: MDI client window is not behaving correctly when maximized (initially, by code)
HOWTO build wxWidgets-2.6.0 for use with Code::Blocks
------------------------------------------------------
This process requires that you have MinGW installed. MSYS is *not* needed.
Download and decompress the wxWidgets-2.6.0 source distribution. For the rest of this small HOWTO, C:\wx2.6.0 will be assumed to be the directory wxWidgets-2.6.0 exists in.
Open a command prompt and type the following:
cd C:\wx2.6.0\build\msw
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=cb
cd ..\..\contrib\build\stc
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=cb
If all has gone well, the necessary libs and DLLs will exist in C:\wx2.6.0\lib\gcc_dll.
Copy the DLLs somewhere in your path (c:\windows\system32 is a good choice).
Open CodeBlocks-wx2.6.0.cbp with Code::Blocks and add the following search dirs:
Compiler:
C:\wx2.6.0\include
C:\wx2.6.0\contrib\include
Linker:
C:\wx2.6.0\lib\gcc_dll
Resource compiler:
C:\wx2.6.0\include
Now hit "Compile".
That's it!
Now, fix that MDI window bug ;)
REMARKS:
- If all goes well and you build Code::Blocks with wx2.6.0, but when you launch it it crashes, delete all plugins and hit "Compile" again (it will only link the plugins).
- Different object files output dirs are used for building Code::Blocks with wx2.6.0, so you can have Code::Blocks work with either wxWidgets version (2.4.2 or 2.6.0) independently.
If you have any problems, post them in the Development forum at http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewforum&f=7 (http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewforum&f=7)
Yiannis.
Sorry, if this is the wrong area to post a problem with wx 2.6.0 building, but here is my issue: I am using CodeBlocks final beta and I followed the instruction above with only one change, I had to use "make" instead of "mingw32-make", and i got this error:
if not exist gcc_msw mkdir gcc_msw
if not exist ..\..\lib\gcc_lib\msw mkdir ..\..\lib\gcc_lib\msw
if not exist ..\..\lib\gcc_lib\msw\wx mkdir ..\..\lib\gcc_lib\msw\wx
if not exist ..\..\lib\gcc_lib\msw\wx\setup.h copy ..\..\include\wx\msw\setup.h
..\..\lib\gcc_lib\msw\wx\setup.h
1 file(s) copied.
gcc -c -o gcc_msw\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -I..\..\inc
ude -I..\..\lib\gcc_lib\msw -D__WXMSW__ ../../src/regex/regcomp.c
In file included from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
../../src/regex/regcustom.h:39:23: wx/wxchar.h: No such file or directory
It was quite difficult to grab, becuase that is the first of what must be hundreds of errors (they scroll by with almost one every line). My hunch is that I am using the wrong version of make, can you help me.
BTW- wxWidgets is in c:\wx, so there are no file name spaces.
EDIT- Make version - 3.77
UPDATE-
I download Mingw 3.1.0-1 and wxWidgets is now compiling, but that only uses GCC 3.2.x. Will this compiled version of wxWidgets work wtih codeblocks? and why does this compiled with an independent Mingw install but not codeblocks?
I can compile 2.6.1 of wxWidgets using make & msys, but I can't do it with the mingw32-make. When I use make, it doesn't end up in the gcc_dll directory. I manually created those directories. I get the following when trying to compile with mingw32-make from the command prompt:
C:\development\projects\WX_2_6_1\wxWidgets\build\msw>mingw32-make.exe -f makefil
e.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=CB
gcc -c -o gcc_mswdll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -I..\..\i
nclude -I..\..\lib\gcc_dll\msw -D__WXMSW__ ../../src/regex/regcomp.c
process_begin: CreateProcess((null), gcc -c -o gcc_mswdll\wxregex_regcomp.o -O2
-mthreads -DHAVE_W32API_H -I..\..\include -I..\..\lib\gcc_dll\msw -D__WXMSW__ ..
/../src/regex/regcomp.c, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe: *** [gcc_mswdll\wxregex_regcomp.o] Error 2
I have make: 3.80.0-3
winXP SP2 for my windows version
So, I don't think that's the problem. I did run a ./configure in msys first because I tried make when I got the error first.
Thank you in advance.
jmccay
I did eventually find out that --jobs doesn't work without sh. Oh well. After compiling successfully, I found out I didn't have the same version of Mingw as that in the packaged version of cb. I got a compiled with different versions error.
I decided to set my path to the codeblocks bin (C:\Program Files\CodeBlocks\bin) and (C:\Program Files\CodeBlocks\mingw32\bin) and now I get a bunch of duplicate warnings similar to:
../../include/wx/string.h:58: warning: type attributes are honored only at type definition
then at the end I get stuff like this:
gcc_mswdll\basedll_archive.o(.data$_ZTI21wxArchiveClassFactory[typeinfo for wxAr
chiveClassFactory]+0x0):archive.cpp: first defined here
gcc_mswdll\basedll_zipstrm.o(.rdata$_ZTS21wxArchiveClassFactory[typeinfo name fo
r wxArchiveClassFactory]+0x0):zipstrm.cpp: multiple definition of `typeinfo name
for wxArchiveClassFactory'
I want to make sure wxWidegts 2.6.1 with patch is compiled with the same version as CodeBlocks. Unfortunately, downloading a new version of Mingw until I get my car back from the shop. Any suggestions. Once I get everything up and running I want to help out with cb development. I like cb because of its modular design.
jmccay
I uninstalled the final beta and installed RC1. I chose not to clear the settings. I set my path to include:
C:\Program Files\CodeBlocks\bin
My wxWidgets 2.6.1 (from CVS with the patch installed manually because it was available later) is in the this directory:
C:\development\projects\WX_2_6_1\wxWidgets
I am still getting these warnings--endless warnings. I can't figure out why. It finishes compiling without errors, but I was wondering what was causing all the warning. I get the dlls and archives.
../../include/wx/datetime.h:34: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:35: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:36: warning: type attributes are honored only at typ
e definition
../../include/wx/datetime.h:111: warning: type attributes are honored only at ty
pe definition
../../include/wx/datetime.h:1440: warning: type attributes are honored only at t
ype definition
jmccay
I just started a new project using RC1-1 using the wxWidgets template. I get the following linker error:
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
I don't understand why it's not finding the the wxmsw library. What's the sepcific name of the library. I have a "libwxmsw26.a". I have the DLLs in both the windows/system32 directory and in the same directory as the .a the paths are all set in the search directories. I am at a loss. I compiled an earlier project created with the Final-Beta, and it ran.
Any suggestions?
Joe M.
I messed with my setup & I cannot figure out what is wrong. Does anyone have any ideas what could cause this?
$ mingw32-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
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\Program Files\CodeBlocks\bin\mingw32-make.exe: [gcc_mswdll] Error 258 (ignored)
if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\Program Files\CodeBlocks\bin\mingw32-make.exe: *** [..\..\lib\gcc_dll\msw] Error 258
I am answering my own question before I post it in case someone else has a momentary lapse of intelligence and doesn't read the installation. the the makefile.gcc doesn't work under msys. It's for mingw using the windows command prompt. :P
joe
I read the wiki and I used command prompt.
But normal command prompt gives me exactly the same error message as msys:
C:\wxWidgets-2.6.2\build\msw>C:\msys\1.0\bin\make -f makefile.gcc USE_XRC=1 SHAR
ED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
if exist gcc_mswudll\*.o del gcc_mswudll\*.o
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist gcc_mswudll\*.d del gcc_mswudll\*.d
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxzlib.a del ..\..\lib\gcc_dll\libwxzlib.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxpng.a del ..\..\lib\gcc_dll\libwxpng.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxjpeg.a del ..\..\lib\gcc_dll\libwxjpeg.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxtiff.a del ..\..\lib\gcc_dll\libwxtiff.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxexpat.a del ..\..\lib\gcc_dll\libwxexpat.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_gcc_custom.dll del ..\..\lib\gcc_dll\wxmsw26
u_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u.a del ..\..\lib\gcc_dll\libwxmsw26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u.a del ..\..\lib\gcc_dll\libwxmsw26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_gcc_custom.dll del ..\..\lib\gcc_dll\wxbase
26u_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u.a del ..\..\lib\gcc_dll\libwxbase26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u.a del ..\..\lib\gcc_dll\libwxbase26u.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_net_gcc_custom.dll del ..\..\lib\gcc_dll\wx
base26u_net_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_net.a del ..\..\lib\gcc_dll\libwxbase26u
_net.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_net.a del ..\..\lib\gcc_dll\libwxbase26u
_net.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_core_gcc_custom.dll del ..\..\lib\gcc_dll\wx
msw26u_core_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_core.a del ..\..\lib\gcc_dll\libwxmsw26u_
core.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_core.a del ..\..\lib\gcc_dll\libwxmsw26u_
core.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_adv_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw26u_adv_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_adv.a del ..\..\lib\gcc_dll\libwxmsw26u_a
dv.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_adv.a del ..\..\lib\gcc_dll\libwxmsw26u_a
dv.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_media_gcc_custom.dll del ..\..\lib\gcc_dll\w
xmsw26u_media_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_media.a del ..\..\lib\gcc_dll\libwxmsw26u
_media.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_media.a del ..\..\lib\gcc_dll\libwxmsw26u
_media.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_odbc_gcc_custom.dll del ..\..\lib\gcc_dll\w
xbase26u_odbc_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_odbc.a del ..\..\lib\gcc_dll\libwxbase26
u_odbc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_odbc.a del ..\..\lib\gcc_dll\libwxbase26
u_odbc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_dbgrid_gcc_custom.dll del ..\..\lib\gcc_dll\
wxmsw26u_dbgrid_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_dbgrid.a del ..\..\lib\gcc_dll\libwxmsw26
u_dbgrid.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_dbgrid.a del ..\..\lib\gcc_dll\libwxmsw26
u_dbgrid.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_html_gcc_custom.dll del ..\..\lib\gcc_dll\wx
msw26u_html_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_html.a del ..\..\lib\gcc_dll\libwxmsw26u_
html.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_html.a del ..\..\lib\gcc_dll\libwxmsw26u_
html.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_qa_gcc_custom.dll del ..\..\lib\gcc_dll\wxms
w26u_qa_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_qa.a del ..\..\lib\gcc_dll\libwxmsw26u_qa
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_qa.a del ..\..\lib\gcc_dll\libwxmsw26u_qa
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxbase26u_xml_gcc_custom.dll del ..\..\lib\gcc_dll\wx
base26u_xml_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_xml.a del ..\..\lib\gcc_dll\libwxbase26u
_xml.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxbase26u_xml.a del ..\..\lib\gcc_dll\libwxbase26u
_xml.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_xrc_gcc_custom.dll del ..\..\lib\gcc_dll\wxm
sw26u_xrc_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_xrc.a del ..\..\lib\gcc_dll\libwxmsw26u_x
rc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_xrc.a del ..\..\lib\gcc_dll\libwxmsw26u_x
rc.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\wxmsw26u_gl_gcc_custom.dll del ..\..\lib\gcc_dll\wxms
w26u_gl_gcc_custom.dll
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_gl.a del ..\..\lib\gcc_dll\libwxmsw26u_gl
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
if exist ..\..\lib\gcc_dll\libwxmsw26u_gl.a del ..\..\lib\gcc_dll\libwxmsw26u_gl
.a
/bin/sh.exe: -c: line 2: syntax error: unexpected end of file
make: [clean] Error 2 (ignored)
/usr/bin/make -C ..\..\samples -f makefile.gcc CC="gcc" CXX="g++" CFLAGS="" CXXF
LAGS="" CPPFLAGS="" LDFLAGS="" SHARED="1" WXUNIV="0" UNICODE="1" MSLU="0" BUILD=
"release" DEBUG_INFO="default" DEBUG_FLAG="default" MONOLITHIC="1" USE_GUI="1" U
SE_HTML="1" USE_XRC="1" USE_OPENGL="0" USE_ODBC="0" USE_QA="0" USE_EXCEPTIONS="1
" USE_RTTI="1" USE_THREADS="1" OFFICIAL_BUILD="0" VENDOR="custom" WX_FLAVOUR=""
WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIME_LIBS="dynamic
" GCC_VERSION="3" clean
make: *** ....samples: No such file or directory. Stop.
make: *** [clean] Error 2
You're still using the MSYS make. Don't do that, use the one that comes with MinGW (mingw32-make).
I yust downloaded mingw32-make (http://prdownloads.sf.net/mingw/mingw32-make-3.80.0-3.exe?download) and tried again, now the error is a little bit different:
C:\wxWidgets-2.6.2\build\msw>c:\mingw\bin\mingw32-make -f makefile.gcc USE_XRC=1
SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
if exist gcc_mswudll\*.o del gcc_mswudll\*.o
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\mingw\bin\mingw32-make: [clean] Error 258 (ignored)
if exist gcc_mswudll\*.d del gcc_mswudll\*.d
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\mingw\bin\mingw32-make: [clean] Error 258 (ignored)
if exist ..\..\lib\gcc_dll\libwxregexu.a del ..\..\lib\gcc_dll\libwxregexu.a
/usr/bin/sh: -c: line 2: syntax error: unexpected end of file
c:\mingw\bin\mingw32-make: [clean] Error 258 (ignored)
if exist ..\..\lib\gcc_dll\libwxzlib.a del ..\..\lib\gcc_dll\libwxzlib.a
....
c:/mingw/bin/mingw32-make -C ..\..\samples -f makefile.gcc CC="gcc" CXX="g++" CF
LAGS="" CXXFLAGS="" CPPFLAGS="" LDFLAGS="" SHARED="1" WXUNIV="0" UNICODE="1" MSL
U="0" BUILD="release" DEBUG_INFO="default" DEBUG_FLAG="default" MONOLITHIC="1" U
SE_GUI="1" USE_HTML="1" USE_XRC="1" USE_OPENGL="0" USE_ODBC="0" USE_QA="0" USE_E
XCEPTIONS="1" USE_RTTI="1" USE_THREADS="1" OFFICIAL_BUILD="0" VENDOR="custom" WX
_FLAVOUR="" WX_LIB_FLAVOUR="" CFG="" CPPUNIT_CFLAGS="" CPPUNIT_LIBS="" RUNTIME_L
IBS="dynamic" GCC_VERSION="3" clean
c:\mingw\bin\mingw32-make.exe: *** ....samples: No such file or directory. Stop
.
c:\mingw\bin\mingw32-make: *** [clean] Error 2
MSYS wasn´t the problem: WinAVR (a AVR-RISC-Microcontroller-IDE also containing special versions of make and gcc) was the problem. After renaming the winavr-folder it worked. Currently wxWidgets is compiling :D
Edit:
Compiling is complete, I created a new wxWidgets-Project, but project refuses compiling:
main.cpp:24: error: call of overloaded `wxMenu(const char[1])' is ambiguous
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:122: note: candidates are: wxMenu::wxMenu(const wxMenu&) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:59: note: wxMenu::wxMenu(long int) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:57: note: wxMenu::wxMenu(const wxString&, long int) <near match>
main.cpp:28: error: call of overloaded `wxMenu(const char[1])' is ambiguous
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:122: note: candidates are: wxMenu::wxMenu(const wxMenu&) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:59: note: wxMenu::wxMenu(long int) <near match>
C:/wxWidgets-2.6.2/include/wx/msw/menu.h:57: note: wxMenu::wxMenu(const wxString&, long int) <near match>
Process terminated with status 1 (0 minutes, 0 seconds)
After outcommenting the code it compiles fine. Is it a bug in CodeBlocks or is something with my installtion wrong?
Also is there any better solution for the wxWidgets library: Even the smallest Programm needs this 10MB dll. Can I compile it somehow different that it only includes the suff I need directly in the exe (SHARED=0 MONOLITHIC=0) or more dlls (SHARED=1 MONOLITHIC=0)?
Anytime I try to compile I get this error:
C:\Dev\wxWidgets-2.6.2\build\msw>mingw32-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
Syntax error: end of file unexpected (expecting "then")
mingw32-make: [gcc_mswdll] Error 2 (ignored)
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
Syntax error: end of file unexpected (expecting "then")
mingw32-make: *** [..\..\lib\gcc_dll] Error 2
CodeBlocks 1.0rc2
wxWidgets 2.6.2
Exactly the same error I get if I use MinGW or make downloaded separately.
I even tried with MSYS - exactly the same...
Hi,
I just tried to compil wxwidgets 2.6.2 with this command line:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 UNICODE=0 VENDOR=cb WXUNIV=1
It works, but when i lunch code::blocks, set the different path i have an error message
here is the log:
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : E:\Documents and Settings\Administrator\My Documents\dev\PAC\
--------------------------------------------------------------------------------
Switching to target: default
Precompiling header: wx_pch.h
In file included from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/defs.h:21,
from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/wxprec.h:13,
from ./wx_pch.h:9,
from <command line>:11:
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/platform.h:190:22: wx/setup.h: No such file or directory
In file included from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/platform.h:258,
from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/defs.h:21,
from C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/wxprec.h:13,
from ./wx_pch.h:9,
from <command line>:11:
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:84:9: #error "wxUSE_DYNLIB_CLASS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:100:9: #error "wxUSE_FILESYSTEM must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:121:9: #error "wxUSE_LOG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:129:9: #error "wxUSE_LONGLONG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:219:9: #error "wxUSE_SOCKETS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:227:9: #error "wxUSE_STREAMS must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:243:9: #error "wxUSE_TEXTBUFFER must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:251:9: #error "wxUSE_TEXTFILE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:267:9: #error "wxUSE_URL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:285:9: #error "wxUSE_ACCEL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:293:9: #error "wxUSE_BMPBUTTON must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:301:9: #error "wxUSE_BUTTON must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:309:9: #error "wxUSE_CALENDARCTRL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:317:9: #error "wxUSE_CARET must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:325:9: #error "wxUSE_CHECKBOX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:341:9: #error "wxUSE_CHOICE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:349:9: #error "wxUSE_CHOICEBOOK must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:357:9: #error "wxUSE_CHOICEDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:365:9: #error "wxUSE_CLIPBOARD must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:373:9: #error "wxUSE_COLOURDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:381:9: #error "wxUSE_COMBOBOX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:389:9: #error "wxUSE_DATAOBJ must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:397:9: #error "wxUSE_DATEPICKCTRL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:405:9: #error "wxUSE_DISPLAY must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:413:9: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:421:9: #error "wxUSE_FILEDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:429:9: #error "wxUSE_FONTDLG must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:437:9: #error "wxUSE_FONTMAP must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:445:9: #error "wxUSE_GAUGE must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:453:9: #error "wxUSE_GRID must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:461:9: #error "wxUSE_HELP must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:469:9: #error "wxUSE_HTML must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:477:9: #error "wxUSE_XRC must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:498:9: #error "wxUSE_ICO_CUR must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:506:9: #error "wxUSE_IFF must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:514:9: #error "wxUSE_IMAGLIST must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:522:9: #error "wxUSE_JOYSTICK must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:530:9: #error "wxUSE_LISTBOOK must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:538:9: #error "wxUSE_LISTBOX must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:546:9: #error "wxUSE_LISTCTRL must be defined."
C:/wxWidgets-2.6.2/wxWidgets-2.6.2/include/wx/chkconf.h:554:9: #error "wxUSE_LOGGUI must be defined."
Process terminated with status 1 (0 minutes, 5 seconds)
I don't understand the problem, if someone could help me please.
Can anybody help me with my "stupid" error?
Anytime I try to build wxWidgets I get exactly the same "syntax error"...
Even without any additional option:
C:\Dev\wxWidgets-2.6.2\build\msw>mingw32-make -f makefile.gcc
if not exist gcc_mswd mkdir gcc_mswd
Syntax error: end of file unexpected (expecting "then")
C:\dev\CodeBlocks\bin\mingw32-make: [gcc_mswd] Error 2 (ignored)
if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib
Syntax error: end of file unexpected (expecting "then")
C:\dev\CodeBlocks\bin\mingw32-make: *** [..\..\lib\gcc_lib] Error 2
What am I doing wrong? :?
Try this too
C:\Dev\wxWidgets-2.6.2\build\msw>mingw32-make -f makefile.gcc BUILD=release
I think you are supposed to tell wx which build to build. Ex. release or debug....... I could be wrong though.
You do need mingw32-make ver 3.80 just like killerbot said. :D