User forums > Help

wxWidgets Sample compiling error

(1/3) > >>

cs378:
I have just successfully build wxWidgets 3.8.5 (took a day...)

Now I wanted to just compile a simple code in Code:Blocks.

I did File --> New Project

I selected wxWidgets project. Clicked on next on everything for default.

Now I compile the sample code and I get:

C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw28d_core


I am using Code::Blocks SVN 4466 in Windows XP Pro SP2

In my Global Variables
Base: C:\wxWidgets-2.8.5
include: C:\wxWidgets-2.8.5\include
lib: C:\wxWidgets-2.8.5\lib\gcc_lib
others are left blank.

In my compiler and debugger --> Search Directories
Compiler: C:\wxWidgets-2.8.5\include
                       C:\wxWidgets-2.8.5\include\wx\msw
                       C:\wxWidgets-2.8.5\contrib\include
                       C:\MinGW\include
Linker: C:\wxWidgets-2.8.5\lib
                   C:\wxWidgets-2.8.5\lib\gcc_lib
                   C:\MinGW\lib
Resource Compiler:  C:\MinGW\include

And yes this is my first time using code::blocks :P

Thanks in advance.


                       

MortenMacFly:

--- Quote from: cs378 on September 14, 2007, 06:42:43 am ---I have just successfully build wxWidgets 3.8.5 (took a day...)

C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw28d_core


--- End quote ---
Seems you have compiled the wxWidgets lib with MONOLITIC=1 but try to use them differently (with separated libs). You only need to link against wxmsw28 (or wxmswd28 for the debug build). Setup your linker options accordingly. BTW: I realised you are linking against the debug lib (wxmsw28d_core). Are you sure you have built this, too? Otherwise you have to compile the debug version of wx, too or simply link against the release version unless you really wanrt to debug into wx itself.
With regards, Morten.

cs378:
Thank you for replying :)

yes you are right i compiled with MONOLITHIC = 1

mingw32-make -f makefile.gcc  MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

So should I compile it again like this:

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release

Yeah I build it twice, the first build i used BUILD = debug
then is clean it and build with the top code.

I guess the clean didnt work well

MortenMacFly:

--- Quote from: cs378 on September 14, 2007, 07:18:39 am ---So should I compile it again like this:
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release

--- End quote ---
Depends on what you have in mind. Both ways are possible: monolitic and shared. monolitic means "easier" project setup but slightly bigger executables. C::B uses monolitic. Shared means you have to think about what wx libs you actually use/need and link only against those. Nice one, too. What do you want? :)

cs378:
errr.... I'm a newbie. This is my first time trying both wxWidgets and Code::Blocks

I guess the easier the better :P

So...

mingw32-make -f makefile.gcc  MONOLITHIC=1 UNICODE=1 BUILD=release

I am building from a fresh wxWidgets source. Hope this time it'll work :P

Thanks  :wink:

Navigation

[0] Message Index

[#] Next page

Go to full version