Finally I made a step-by-step tutorial on installing and configuring wxWidgets 2.4.2 (http://codeblocks.sourceforge.net/wiki/index.php/Compiling_wxWidgets_2.4.2_to_develop_Code::Blocks_%28MSW%29) under Microsoft Windows (TM).
Enjoy!
Great stuff Rick :)
I just added a note that MSYS is not actually required... It works just the same without it ;)
Yiannis.
Um, then my setup's the one not working :( So how can I compile wxWidgets WITHOUT msys?
But, you 're using nothing MSYS-specific. Just 'cd' and 'mingw32-make'. Did I miss something? I read it very carefully.
And I don't have MSYS installed here...
Yiannis.
I manage to compile codeblock but get a few warnings . And when I try to run it , the normal windows error message pop "codeblocks.exe is causing error .. "
However , I do not follow exactly the steps in wiki , in fact I am testing the options 2 .
I plan to reinstall MSYS , MingW and wxwidgets-2.4.2 , and build again .
Just have a question , if I compile the wxwidgets with UNICODE=1 , will there be any problem ? because I may want to build Unicode application with the wxwidgets.
Thanks for all the guidance , if I manage to compile successfully with the options 2 , I shall add in the wiki later.
I hv tried again but still failed.
Therefore, I decided to use the method in wiki , however, I got the same result. (I deleted the CVS and download again)
Still trying to figure out what had happened.
I try to compile wx2.4.2 according the manual, but ut says it couldn't find setup.h
cp ../../include/wx/msw/setup.h ../../lib/mswdlld/wx/setup.h
process_begin: CreateProcess((null), cp ../../include/wx/msw/setup.h ../../lib/mswdlld/wx/setup.h, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [../../lib/mswdlld/wx/setup.h] Error 2It is a complete fresh install (wxAll). Any ideas?
--edit--
I see what the problem is, no cp.exe :)
Solution: get the extra.zip (ftp://biolpc22.york.ac.uk/pub/ports/mingw32/extra.zip) package (probably only when you didn't install msys)
Cool! Can you put that in the wiki, too?
QuoteI see what the problem is, no cp.exe Smile
Solution: get the extra.zip package (probably only when you didn't install msys)
That's why I missed it!
With C::B full install we supply cp.exe and, if I remember correctly, I *think* I have posted a link to extra.zip some time ago...
Thanks mispunt :)
Yiannis.
updated, perhaps it is possible to remove the msys completly?
Quote from: mispuntupdated, perhaps it is possible to remove the msys completly?
Sure thing. Go on and edit it.
Yiannis.
Two things:
Thirst, I can't reach the wiki page via the menu (it is edit only)
Secons, where do I have to set ${WX_VER}? It should be set somewhere, but I don't know where.
The tutorial linked to a non-existent version of the wx242 article. Fixed. Now you can edit the wiki :)
NOTE: You have to sign up for the wiki (it uses a different login than the forums')
Update: I just changed the "Setup MSYS" section. But the part about building wxWidgets still needs to be updated.
Quote from: mispuntTwo things:
Thirst, I can't reach the wiki page via the menu (it is edit only)
Secons, where do I have to set ${WX_VER}? It should be set somewhere, but I don't know where.
You can set it under menu "Project" > build option > Custom variable
add in a variable WX_VER and value 242
I added in when I encounter a failure compiling one of the plugin yesterday. Today , re download from CVS, the project files already added in this variable.
forget to login when replying ... it's me
I have managed to compile and run C::B, by setting the path , I have written the steps in one of the post below
http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewtopic&t=362&start=15
I do not modify the wiki because after compilation , it needs some tweak to make the CB run . I am not sure whether is because my steps is not totally correct .
Hope it helps.
Quote from: AnonymousQuote from: mispuntTwo things:
Thirst, I can't reach the wiki page via the menu (it is edit only)
Secons, where do I have to set ${WX_VER}? It should be set somewhere, but I don't know where.
You can set it under menu "Project" > build option > Custom variable
add in a variable WX_VER and value 242
I added in when I encounter a failure compiling one of the plugin yesterday. Today , re download from CVS, the project files already added in this variable.
I downloaded the source today (to add OpenWatcom support), and I had the same problem with WX_VER. I thought it was trying to get it from the environment, but I see it wasn't...
I also had build errors trying to locate ..\..\..\MingW\include as a relative path in the src project (compiler options...directories...resource compiler) as I obviously installed my C::B one level deeper than the original developer.
I'm now up and running and have a debuggable C::B (after downloading zip.exe from info-zip :oops: ).
Nice product! Regards,
Carl
Quote from: CarlYoung
I downloaded the source today (to add OpenWatcom support), and I had the same problem with WX_VER. I thought it was trying to get it from the environment, but I see it wasn't...
Sorry, it appears I was wrong. I did have the updated Makefile with WX_VER=242 in it but I was still getting errors related to "can't find libwxmsw$(WX_VER).a".
I'm wondering if this was related to my source code being one layer lower in a folder hierarchy than the original. I moved to /dev/codeblocks and it all worked first build...
Carl
QuoteI downloaded the source today (to add OpenWatcom support)
I just did :D
I will commit the changes later, after I run some tests.
Yiannis.
Yup, I finally managed to build CVS version of C::B (hoooray! :)) under Windows.
First of all,
big thanks for this (http://codeblocks.sourceforge.net/wiki/index.php/Compiling_wxWidgets_2.4.2_to_develop_Code::Blocks_%28MSW%29) Wiki article - it was extremely helpful resource I would surely perish without. :mrgreen:
Then, still I encountered 2 little problems, that are not mentioned in the Wiki. Maybe this can somehow help other people.
1) WX_VER problem. It is described in this very thread, but still seems to exist in CVS version. I don't know where WX_VER variable is set (I haven't found it under Build options->Custom variables), but it seems that $(WX_VER) produces 2.4.2 (2.6.1 respectively) instead of 242 (261), so I got:
Quote from: fearsome linkerLinking dynamic library: devel\codeblocks.dll
E:\progs\dev\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw2.4.2
collect2: ld returned 1 exit status
wxWidgets 2.4.2 compilation (if followed as described in Wiki) produces: libwxmsw
242.a
2) Hmmm. Somehow I was aware to run update.bat in order to create zipped resource files and put them into right places, but it would be nice to mention this, too. :)
However, it was not the problem that I encountered.
You might find this funny, but... it took me quite a moment to set up zip command that is compatible with update script! (that uses -j switch). Maybe it was just my almighty luck (tm) that I used bunch of wrong command-line zip tools (even gzip shipped with
extra.zip package didn't make it), but in case someone also have trouble with this - one of
these tools should help.
This one worked fine for me - just unpack somewhere, and point to its zip.exe in C::B update.bat script (i.e
set ZIPCMD=c:\zip\zip.exe).
Again, thanks for great IDE. :)
Btw. I found out that compiler option "Stop compiling after first error" always seem to produce error (I use MinGW)
Quotecc1plus.exe: error: unrecognized command line option "-Wfatal-errors"
You can set the WX_VER variable in the "Build options", in the "Custom variables" tab. Just add a variable name WX_VER and set its value to 242 -> you're done. My problem with it was a little different though, the error was it couldn't find the library "wxmsw$(WX_VER)", so the var wasn't defined at all...
So I second your request, this should be documented somewhere, took me some time to find it out :)
The zip problem also applied with me, but I just searched my HD for "zip.exe" and was lucky enough to find one that worked -- dunno where though :P
Okay, I added a page to the "Tipps 'n Tricks" section of the wiki, to be found here: http://codeblocks.sourceforge.net/wiki/index.php/Setting_the_WX_VER_variable