User forums > Help

MinGW not compiling WxWidgets project

(1/3) > >>

rnz12:
Hi,

I'm just starting of with C++,

I downloaded Code::Blocks 8.02 with minGW compiler and wxWidgets 2.8.10.
Problem is I cant get wxWidgets working with Code::Blocks..

What I did:
> I start a new wxWidgets project in Code::Blocks
> Version 2.8x
> I add my project title
> I skip project details
> Preferred GUI Builder I choose wxSmith, application type Dialog Based
> I select the folder where I extracted wxWidgets..
C:\wxWidgets-2.8.10
> Compiler chosen GNU GCC Compiler.
> wxWidgets Library settings I checked..
* use wxwidgets DLL.
* wxwidgets is built as a monolithic library
* Enable unicode.

when I click next I then get a warning saying:

--- Quote ---A matching Debug configuration cannot be found in the wxWidgets directory you specified.

This means that Debug target of your project wont build.
Are you sure you want to continue with these settings ?

--- End quote ---

I click on 'YES'... when I try to build the project with build target Release.. I get an error.

--- Quote ---||=== testWX, Release ===|
ld.exe||cannot find -lwxmsw28u|
||=== Build finished: 1 errors, 0 warnings ===|

--- End quote ---

I installed wxMSW-2.8.10
Location: c:\wxWidgets-2.8.10.

Please help !

Thanks

Jenna:
This question has been asked quiet often, so a forum search should probably give you the answer.

Anyway:
You have to build wxwidgets before you can use it!
Look here: http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

hurkslop:
Hi,

I'm starting of with C++ too and i have the same problem as you compiling wxWidgets projects.

Here is a brief historical of what i did :

1) Downloaded and Installed CodeBlocks with MinGW

2) Downloaded and Installed wxMSW-2.8.10-Setup (the exe that extracts wxWidgets)

3) compiled wxWidgets library using the command (after the change of the path etc.) "mingw32-make -f                           makefile.gcc SHARED=0 MONOLITHIC=1 UNICODE=1 BUILD=release" (after cleaning it)

4)copied setup.h to the right directory

5) Opened CodeBlocks, created a wxWidgets project, defined the path for the location of $(#wx), included  $(#wx)\lib\gcc_dll in the search directories.

6) And then i get this reccurent error :
ld.exe||cannot find -lwxmsw28ud|

7)and then looked up in the forums but not good enough obviously.

I understood that using the SHARED=0 delivers a static library (*.a) and MONOLITHIC=1 creates one big DLL.
and that to link a library , for instance $(#wx)\lib\gcc_dll\libwxmsw28u.a, I just have to link with wxmsw28u and the compiler is gonna complete the rest.

I've been trying this since 2 weeks, not continuously but almost.

Thanks for the help,

-----
Hurk

Jenna:

--- Quote from: hurkslop on May 23, 2009, 09:31:26 pm ---4)copied setup.h to the right directory

--- End quote ---

Never move setup.h !!!

If you do so, you will most likely break your wxWidgets build.
There is a setup.h for each compiled library and it is in the correct place.

Read the tutorial (I posted the link before) or use the wxWidgets part from the nightly cookbook (http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook).
It is normally straightforward.

And again never move setup.h.

If someone tells you, that it has to be done, he lies !

stahta01:

--- Quote from: jens on May 23, 2009, 09:44:57 pm ---
--- Quote from: hurkslop on May 23, 2009, 09:31:26 pm ---4)copied setup.h to the right directory

--- End quote ---

Never move setup.h !!!

If you do so, you will most likely break your wxWidgets build.
There is a setup.h for each compiled library and it is in the correct place.

Read the tutorial (I posted the link before) or use the wxWidgets part from the nightly cookbook (http://wiki.codeblocks.org/index.php?title=Nightly_Cookbook).
It is normally straightforward.

And again never move setup.h.

If someone tells you, that it has to be done, he lies !

--- End quote ---

I agree with the above and add never edit or rename setup0.h.

Navigation

[0] Message Index

[#] Next page

Go to full version