Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Bother Compiling and Starting a WxWidgets Project

(1/2) > >>

Zachary1234:
I am running Code::Blocks on Windows 10 64 bit Home Edition.
I have installed WXBuilder.

I am trying to set up WXWidgets so that I can program using those library classes.
I have successfully cleaned and built wxwidgets via an administrator mode command line,
via the following:

wxMSW-3.1.1-Setup

C:\Program Files\wxWidgets-3.1.1\build\msw

mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport" clean

mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport"

I still can't create a project with no errors.

Script error

The path you enteres seems valid, but this wizard can't
locate wxWidgets' files in it...
OK

Warning

A matching Debug configuration cannot be found in the
wxWidgets directory you specified.
Would you like to link this target against the release binaries
instead?
(Debugging the executables will still be possible.)
Yes | No

-What should I do so that I can create a WXBuilder project with no errors?
-Will this leave me with internal links from Code::Blocks to WXBuilder as well?

Miguel Gimenez:
The wizard tests if include/wx/wx.h exists in the folder you provided.
Regarding the debug configuration, it is not needed unless you want to debug wxWidgets itself, you can click on Yes safely.

BlueHazzard:
I don't know if you can use wxBuilder with codeblocks...

The problem is the wizard does not know about the "USE_OPENGL=1" flag. It does not search for the

--- Code: ---wxmsw310u_gl_gcc_custom.dll
--- End code ---
but for
--- Code: ---wxmsw310u_gcc_custom.dll
--- End code ---
Can you open a ticket on SF and report this? It should be easily fixable.. https://sourceforge.net/p/codeblocks/tickets/747/

To make quick steps you can do two things:
1) Compiler wx Without OpenGL if you don't need it
2) Fix the project by yourself:
Finish the wizard. Then go to
Project->Build options->select Debug on the left side->Linker settings->Change the name of the library accordingly  to "libwxmsw31ud_gl"
Project->Build options->select Release on the left side->Linker settings->Change the name of the library accordingly to "libwxmsw31u_gl"


For reference the way to create a new project if you compile without Opengl:
My wxWidgets installation is in

--- Code: ---G:\Programming\wxWidgets310
--- End code ---
so the path to the dll is as follows:

--- Code: ---G:\Programming\wxWidgets310\lib\gcc_dll\wxmsw310u_gcc_custom.dll
--- End code ---

Steps i do:
1) File->New->Project->wxWidgets
2) Next
3) select wxWidgets 3.1.x -> next
4) Enter project title. For example "testwx" -> next
5) Next
6) wxSmith -> Next
7) Enter path to wxWidgets: G:\Programming\wxWidgets310 -> Next
8) Ticks at follwoing selections:

--- Code: ---Use wxWidgets dll
wxWidgets is build as monolithic library
Enable unicode

--- End code ---
9) Next
10) Build and run



Zachary1234:
I have carried out your suggestion, and find that my build still does not work.  It is not producing

wxmsw310u_gcc_custom.dll

for me at all.

I use the following two commands to attempt to do my build:

mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport" clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport"

Can someone reply with a better set of commands for me, please?

BlueHazzard:

--- Quote ---I have carried out your suggestion, and find that my build still does not work.  It is not producing
--- End quote ---
Without error message it is impossible to solve the error.. Crystal balls are out of order since 200 years, sry...


I can compile wxWidgets and use it on codeblocks with the following command:

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

--- End code ---

You should delete your wxWidgets source and redownload or unzip it, to remove all not needed object files ecc...

Navigation

[0] Message Index

[#] Next page

Go to full version