Code::Blocks Forums

User forums => Help => Topic started by: rickg22 on May 25, 2005, 07:43:52 am

Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: rickg22 on May 25, 2005, 07:43:52 am
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!
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: mandrav on May 25, 2005, 08:51:56 am
Great stuff Rick :)
I just added a note that MSYS is not actually required... It works just the same without it ;)

Yiannis.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: rickg22 on May 25, 2005, 06:09:53 pm
Um, then my setup's the one not working :(  So how can I compile wxWidgets WITHOUT msys?
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: mandrav on May 25, 2005, 07:41:48 pm
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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: cyberkoa on May 26, 2005, 02:15:38 am
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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: Anonymous on May 26, 2005, 07:28:27 am
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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: David Perfors on May 26, 2005, 07:32:30 am
I try to compile wx2.4.2 according the manual, but ut says it couldn't find setup.h
Code
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 2
It is a complete fresh install (wxAll). Any ideas?

--edit--
I see what the problem is, no cp.exe :)
Solution: get the extra.zip (http://ftp://biolpc22.york.ac.uk/pub/ports/mingw32/extra.zip) package (probably only when you didn't install msys)
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: rickg22 on May 26, 2005, 07:50:56 am
Cool! Can you put that in the wiki, too?
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: mandrav on May 26, 2005, 08:25:55 am
Quote
I 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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: David Perfors on May 26, 2005, 10:13:02 am
updated, perhaps it is possible to remove the msys completly?
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: mandrav on May 26, 2005, 12:18:25 pm
Quote from: mispunt
updated, perhaps it is possible to remove the msys completly?

Sure thing. Go on and edit it.

Yiannis.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: David Perfors on May 26, 2005, 11:17:58 pm
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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: rickg22 on May 26, 2005, 11:52:36 pm
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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: Anonymous on May 27, 2005, 03:11:43 am
Quote from: mispunt
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.


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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: cyberkoa on May 27, 2005, 04:31:55 am
forget to login when replying  ... it's me
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: cyberkoa on May 27, 2005, 10:14:49 pm
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.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: CarlYoung on May 28, 2005, 09:58:16 pm
Quote from: Anonymous
Quote from: mispunt
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.


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
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: CarlYoung on May 28, 2005, 10:24:48 pm
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
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: mandrav on May 28, 2005, 11:02:33 pm
Quote
I downloaded the source today (to add OpenWatcom support)

I just did :D
I will commit the changes later, after I run some tests.

Yiannis.
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: squizzz on July 03, 2005, 04:34:43 pm
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 linker
Linking 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: libwxmsw242.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 (http://ftp://biolpc22.york.ac.uk/pub/ports/mingw32/extra.zip) package didn't make it), but in case someone also have trouble with this - one of these (http://ftp://ftp.uu.net/pub/archiving/zip/WIN32/) tools should help. This (http://ftp://ftp.uu.net/pub/archiving/zip/WIN32/zip23xN.zip) 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)
Quote
cc1plus.exe: error: unrecognized command line option "-Wfatal-errors"
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: CrayzeeIvan on July 03, 2005, 07:58:50 pm
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
Title: wxWidgets 2.4.2 (MSW, GCC) installation instructions
Post by: CrayzeeIvan on July 03, 2005, 08:08:17 pm
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