User forums > Help

wxWidgets 2.6 (MSW, GCC) installation instructions

<< < (27/29) > >>

thomas:

--- Quote from: macwolf on March 23, 2006, 08:37:31 am ---I can't compile any wxWidgets program. Output is:
D:/CodeBlocks/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
[...]
--- End quote ---
Such messages appear for example if the setup.h file (normally found in include/wx/msw) which you include is not compatible with your wxWidgets build or is missing alltogether.

How could  it be missing, the compiler would throw an error, you ask? No, you do not necessarily get an error message, since there is usually another setup.h (completely unrelated) in your include dirs, and the compiler will use that one if it does not find the correct one.

Make sure that the include paths are properly set up. The easiest and most foolproof way is to do it as we do in the Code::Blocks build and which is assumed for the templates too: keep wxWidgets in one place (don't copy headers to D:/CodeBlocks/include/ like you did). Unzip it to some arbitrary location. Configure it there, compile it there, leave it there. Don't touch anything afterwards.
Then make a variable or global user variable (if you're using a recent build) pointing to the wx directory, and add $YOURVARIABLE/lib/gcc_dll/msw and $YOURVARIABLE/include to the top of compiler includes. If you use several builds (unicode / non-unicode, for example), you can use a second variable to distinguish builds, too.
That way, everything works, it is foolproof, and you can switch versions painlessly.


--- Quote from: MortenMacFly on March 23, 2006, 09:08:37 am ---Please post the full command line log (to be enabled int he compiler settings) so we can help you.
--- End quote ---
Yes, that, and the version.
Whenever reporting any kind of problem, please always provide the exact program revision and the full build commandline. The best thing to do (if you have a recent build) is to click on the revision string in the "start here" page. That copies the revision information to the clipboard. Paste it as the first line of your post.

macwolf:

I'm using Code::Blocks v1.0,WxWidgets 2.6.2, makefile done with gcc 3.9.0
trying to compile template from Code::Blocks.


I've tried to change path directly to Widgets installed on other drive:
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : D:\CodeBlocks\widegt\
--------------------------------------------------------------------------------
mingw32-g++.exe -LC:/wxWidgets-2.6.2/lib/gcc_dll -LD:/CodeBlocks/lib -o D:/CodeBlocks/widegt/wxWidgets.exe .objs/main.o     -lwxmsw26 C:\wxWidgets-2.6.2\lib\gcc_dll\libwxregexu.a -mwindows
D:\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26
collect2: ld returned 1 exit status
make.exe: *** [D:/CodeBlocks/widegt/wxWidgets.exe] Error 1
Process terminated with status 1 (0 minutes, 2 seconds)

Build message:  ld.exe cannot find  -lwxmsw26

MortenMacFly:

--- Quote from: macwolf on March 23, 2006, 02:48:54 pm ---mingw32-g++.exe -LC:/wxWidgets-2.6.2/lib/gcc_dll
Build message:  ld.exe cannot find  -lwxmsw26

--- End quote ---
Why do you use forward slashes? This could be a problem. Furthermore: Is your wxWidgtes SDK really installed in C:/wxWidgets-2.6.2? This very much looks like a default value to me.
With regards, Morten.

Edit: BTW: You know that to compile a wxWidgets application you need the wxWidgets SDK (headers and libs) too, right? They not ship with C::B but have to be installed (and compiled) separately.

tiwag:
the forward slashes don't harm

MortenMacFly:

--- Quote from: tiwag on March 23, 2006, 03:27:59 pm ---the forward slashes don't harm

--- End quote ---
Alright, but if there is no wxWidgets at this place this would harm. ;-)
With regards, Morten.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version