Author Topic: wxWidget with codeblocks problem  (Read 49637 times)

Offline gtafan

  • Almost regular
  • **
  • Posts: 126
wxWidget with codeblocks problem
« on: March 24, 2017, 01:49:52 pm »
Have instaled CodeBlocks and wxWidget 3.0.x but still unable to start a wxWidget project, always geting this error mesages:





I don´t care about debug, as never using it, but release is a problem.
My OS is Windows, but it should be already clear because of the pics.
« Last Edit: March 24, 2017, 01:52:06 pm by gtafan »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: wxWidget with codeblocks problem
« Reply #1 on: March 24, 2017, 03:12:48 pm »
How did you build the wxWidgets binaries?

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

Offline gtafan

  • Almost regular
  • **
  • Posts: 126
Re: wxWidget with codeblocks problem
« Reply #2 on: March 24, 2017, 04:22:21 pm »
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1 clean
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1
So after that some .a files apear in the lib folder, but the error mesage staied the same, as befor building.
« Last Edit: March 24, 2017, 04:28:36 pm by gtafan »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: wxWidget with codeblocks problem
« Reply #3 on: March 24, 2017, 04:36:43 pm »
Did you uncheck the "Use wxWidgets DLL" option of the wizard? You created a static version of wxWidgets (SHARED=0).

Offline gtafan

  • Almost regular
  • **
  • Posts: 126
Re: wxWidget with codeblocks problem
« Reply #4 on: March 24, 2017, 05:15:17 pm »
Did you uncheck the "Use wxWidgets DLL" option of the wizard? You created a static version of wxWidgets (SHARED=0).
Yes I did.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxWidget with codeblocks problem
« Reply #5 on: March 24, 2017, 06:32:30 pm »
you can still try to build the project.

probably you have to set some libraries by yourself...

can you give us the path to your wxWidgets build folder and how the libraries are called?

Offline gtafan

  • Almost regular
  • **
  • Posts: 126
Re: wxWidget with codeblocks problem
« Reply #6 on: March 27, 2017, 01:58:37 pm »
Here the path:



but it can´t be the problem, because wrong path would show an error mesage just after this dialog.
My options look like that:



Just for fun have tried all posible combinations, but always got exactlly the same error.

The lib folder looks like that:



and the gcc_lib:



Posibly some .a files are mising?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: wxWidget with codeblocks problem
« Reply #7 on: March 27, 2017, 02:21:16 pm »
There are two missing libraries, libwxmsw30u.a and libwxmsw30u_gl.a.

You should call again the compilation command and look for compilation errors (one frequent error with monolithic builds is related to memory starvation in ld).


Offline gtafan

  • Almost regular
  • **
  • Posts: 126
Re: wxWidget with codeblocks problem
« Reply #8 on: March 27, 2017, 02:55:03 pm »
Should I set monolithic  to 0?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: wxWidget with codeblocks problem
« Reply #9 on: March 27, 2017, 04:04:38 pm »
First you should identify why compilation fails, if it is due to a linker memory error then MONOLITHIC=0 is an option.

In https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW, past the middle of the page, there are some hints compiling wxWidgets in monolithic and static mode (look for To fix issues when compiling static library with MONOLITHIC option and below).

Offline gtafan

  • Almost regular
  • **
  • Posts: 126
Re: wxWidget with codeblocks problem
« Reply #10 on: March 27, 2017, 06:14:03 pm »
Could be problem with static? When I compiled with static=1 there were more .a files there.
Is there any simpler posibility to make WxWidget worck with CodeBlocks? I mean without that anoing comandline stuff. Haev read somewhere about Codeblocks version with everithing istaled, including WxWidgets.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: wxWidget with codeblocks problem
« Reply #11 on: March 27, 2017, 06:49:11 pm »
Could be problem with static? When I compiled with static=1 there were more .a files there.
Is there any simpler posibility to make WxWidget worck with CodeBlocks? I mean without that anoing comandline stuff. Haev read somewhere about Codeblocks version with everithing istaled, including WxWidgets.

Warning: wxWidgets is a C++ Library therefore any Binary will only work with the same C++ Compiler as the binary used when built.

So, you need to decide what C++ Compiler you are going use. Then, find a Binary built for the exact C++ Compiler.
Or, find a pre-built Binary that has a location you can download the C++ Compiler to match.

NOTE: The CB Wizard may or may not work with the pre-built Binary you find.

NOTE: Since, you failed to find the correct sub-forum to post your question; I would guess that creating a CB Project without a
CB Wizard is beyond your current skill level.

I will try to think of a possible solution for newbies like you.

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

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: wxWidget with codeblocks problem
« Reply #12 on: March 27, 2017, 07:03:59 pm »
The "annoying command line stuff" must be executed only once.

Check when the building process failed and then ask in the wxwidgets forum, not here.

Offline gtafan

  • Almost regular
  • **
  • Posts: 126
Re: wxWidget with codeblocks problem
« Reply #13 on: March 30, 2017, 02:05:18 pm »
The "annoying command line stuff" must be executed only once.

Check when the building process failed and then ask in the wxwidgets forum, not here.
Just dont`t understand why can´t codeblocks build WxWigets itself, would make ewerithing easier.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: wxWidget with codeblocks problem
« Reply #14 on: March 30, 2017, 05:44:50 pm »
The "annoying command line stuff" must be executed only once.

Check when the building process failed and then ask in the wxwidgets forum, not here.
Just dont`t understand why can´t codeblocks build WxWigets itself, would make ewerithing easier.

Warning: wxWidgets is a C++ Library therefore any Binary will only work with the same C++ Compiler as the binary used when built.

Please read what I posted! Then, understand the Code::Blocks is a IDE that works with many different compilers.

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