Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: InddZen on May 04, 2006, 01:26:46 pm

Title: [Resolved] Please Help - Problems with wxWidgets Install
Post by: InddZen on May 04, 2006, 01:26:46 pm
I'm trying since 2 days to install wxWidgets. (2.6.3-1)
I followed all steps as explained in http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_(MSW (http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_(MSW) but when trying to build CodeBlocks.cpb, I've got a lot of errors.
So I've tried to fix them :
The first one was with a missed wx\setup.h, so I copied it from wx\msw\.
The second one was related to wxscintilla files, I've fixed it temporarilly by coping a wxscintilla.h to \wx wxWidgets directory and transforming some code's parts to commentaries.
Finally I've got the "cannot find -lwxmsw26".
I don't really know what's the mather. :cry:
So please can somebody help me.
Title: Re: Please Help - Problems with wxWidgets Install
Post by: MortenMacFly on May 04, 2006, 01:56:41 pm
I'm trying since 2 days to install wxWidgets. (2.6.3-1)
Well it's not very precicly but what I read from your description is that the compiler / linker does not know the path of C::B and/or wxWidgets. You might also miss to setup the global and/or user variables correctly. Copying header files to another folder just to be found is a very bad idea. This is usually just a missing include path, trust me.
BTW: Did you compile wxWidgets successfully before you try to compile C::B?
With regards, Morten.
Title: Re: Please Help - Problems with wxWidgets Install
Post by: InddZen on May 04, 2006, 02:31:23 pm
Well, wxWidgets compilation was successful.

And here's related lines from the CodeBlocks Project's Build Options:
Linker  : $(WX_DIR)\lib\gcc_dll\libwxmsw26u.a
Directories :
Compiler :
Linker :
Ressource Compiler:
Custom Variables :
WX_DIR = C:\wxWidgets-2.6.3

I know that's a bad idea to copy headers files from a directory to another, but in the platform.h file there's an #include "wx/setup.h", and setup.h is not located in this directory but in wx\msw\.

PS : Working under Windows.
Title: Re: Please Help - Problems with wxWidgets Install
Post by: PChris on May 04, 2006, 02:56:09 pm
Which version of C::B are you using?
I guess it is an old one...
Theoretically, everybody should use the nightlies by now
Title: Re: Please Help - Problems with wxWidgets Install
Post by: TDragon on May 04, 2006, 03:19:56 pm
Directories :
Compiler :
  • ...
  • $(WX_DIR)\lib\gcc_dll
  • ...
Linker :
  • ...
  • $(WX_DIR)\lib\gcc_dll\mswu
...
I know that's a bad idea to copy headers files from a directory to another, but in the platform.h file there's an #include "wx/setup.h", and setup.h is not located in this directory but in wx\msw\.
This is wrong. I don't know how you got these two switched, because no C::B installation I've ever used has done so, but there it is -- those two lines need to be interchanged. $(WX_DIR)\lib\gcc_dll\mswu belongs in Compiler directories, because it contains the header wx/setup.h, which you should never, ever, copy around. $(WX_DIR)\lib\gcc_dll belongs in Linker directories, because it contains the library libwxmsw26u.a, which will then be found by "-lwxmsw26u" without having to specify the whole path.

Oh, and I'd also recommend upgrading to one of the nightly builds, which would have handled everything for you transparently, as long as you had left your wxWidgets build exactly as it was after "mingw32-make" finished.
Title: Re: Please Help - Problems with wxWidgets Install
Post by: InddZen on May 04, 2006, 04:26:59 pm
Well :oops: It's true that I'm using the old version, and not a nightly build one.
I'm gonna try to find one and hope that it'll be alright.
And I'm sure that there was no setup.h in the \wx directory before I copied it by myself.
Title: Re: Please Help - Problems with wxWidgets Install
Post by: David Perfors on May 04, 2006, 04:33:57 pm
And I'm sure that there was no setup.h in the \wx directory before I copied it by myself.
That's correct, the setup.h file can be found in $(WX_DIR)\lib\gcc_dll\mswu\wx
Title: Re: Please Help - Problems with wxWidgets Install
Post by: InddZen on May 04, 2006, 05:15:32 pm
 :lol: God, I was so stupid.
No more that 5min and everything is alright now.
Thanx guys