News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

WxWidgets Setup Issue

Started by alen12345, August 15, 2012, 09:46:18 AM

Previous topic - Next topic

alen12345

I installed wxwidgets using the instalattion pack with the pre-compiled library and I don't seem to be able to mak it work.
After setting the global compiler variable, I had no problem creating the project but the application does not run. I'm trying to build a Frame Based application using wxSmith. Using wxWidgets DLL it compiles fine but crashes asking for mingw10.dll in debug mode when building and running pressing F9. Turning on the option to build as a monolithic library the compiler throws some errors due to some reference issues.
What's the problem? I installed WxWidgets using the Pack version 2.8, whereas, as fas as the coompiler is concerned, I'm using GCC 4.7.1.

oBFusCATed

Quote from: alen12345 on August 15, 2012, 09:46:18 AM
I installed WxWidgets using the Pack version 2.8, whereas, as fas as the coompiler is concerned, I'm using GCC 4.7.1.
Both compilers (the one used to build wx and the one you're using) must match. If they don't match you'll have endless problems.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

alen12345

Compiled fine in dynamic mode, unfortunately all other options such as static or monolithic fail since codeblocks cannot find the right configuration, even if selected in the wizard. Should I edit some other files after the build to make it work?

Jenna

If you don't have the appropriate wx library, it can not work.
If you compile wxWidgets yourself, you can chose any options you need, if you use precompiled binaries you depend on the distributor.

alen12345

I did not explain my issue properly. I compiled using the other options like for example MONOLITHIC=1 so I have the suitable libraries but codeblocks does not recognize them.

Like explained at this link: http://wiki.wxwidgets.org/WxWidgets_Build_Configurations


Jenna

Quote from: alen12345 on August 16, 2012, 01:37:13 PM
I did not explain my issue properly. I compiled using the other options like for example MONOLITHIC=1 so I have the suitable libraries but codeblocks does not recognize them.

Like explained at this link: http://wiki.wxwidgets.org/WxWidgets_Build_Configurations



In your first post, you wrote, that you use wxWidgets with pre-compiled library.
So now it's not clear for me, what you really use.

Could you please explain exactly what you did, what has failed and which errors you get.

alen12345

#6
Pre-compiled did not work for me, so I decided to build my own libraries as suggested in the first reply. I use GCC 4.7.1 and the build was pretty easy with no problems following also the tutorial found here: http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW

Everything perfect, just needed to copy and paste a couple of dlls in the release folder when trying to run the app outside the IDE.

If I try to build the libraries differently, with other options such as dynamic but monolithic, or static multi-lib, codeblocks reports an error when trying to create the project, saying that it cannot find a correct configuration in the folder provided. For example if I build the libraries with MONOLITHIC=1 and then select monolithic in the wizard codeblocks reports the error that I have just tried to explain. The libraries always build correctly with the options I want, but when codeblocks is instructed to use a different specification from Dll and unicode, it cannot find the right configuration.

Link for other flags:

http://wiki.wxwidgets.org/WxWidgets_Build_Configurations


Commands to build the libraries;

make -f makefile.gcc MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport" SHARED=1 UNICODE=1 BUILD=release

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

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

Only the last one works, unfortunately.

Thank you for your interest.

stahta01

Quote from: alen12345 on August 16, 2012, 03:19:34 PM
Pre-compiled did not work for me, so I decided to build my own libraries as suggested in the first reply. I use GCC 4.7.1 and the build was pretty easy with no problems following also the tutorial found here: http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW

Everything perfect, just needed to copy and paste a couple of dlls in the release folder when trying to run the app outside the IDE.

If I try to build the libraries differently, with other options such as dynamic but monolithic, or static multi-lib, codeblocks reports an error when trying to create the project, saying that it cannot find a correct configuration in the folder provided. For example if I build the libraries with MONOLITHIC=1 and then select monolithic in the wizard codeblocks reports the error that I have just tried to explain. The libraries always build correctly with the options I want, but when codeblocks is instructed to use a different specification from Dll and unicode, it cannot find the right configuration.

Link for other flags:

http://wiki.wxwidgets.org/WxWidgets_Build_Configurations


Commands to build the libraries;

make -f makefile.gcc MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport" SHARED=1 UNICODE=1 BUILD=release

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

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

Only the last one works, unfortunately.

Thank you for your interest.

I DO NOT have success building both MONOLITHIC and MultiLib in the same wxWidgets folders.
If you wish to do both you should have two different wxWidgets folders.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

alen12345

I already knew that! Every time I test new configurations I delete the old libraries, and start from scratch. And the problem always persists.

I try those commands separately, just one of them per build!

stahta01

Are you cleaning the folders correctly?


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

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

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


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

alen12345

Absolutely! First clean,  then build. The commands are the ones listed above. Thank you for the interest.

Ale N.