Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 4:25 pm
New Pagodi wrote:jjepsuomi wrote:
Hi New Pagodi,
I tried your suggestion

Here is what resulted: (I included step-by-step what I did)
OK. So there are at least 2 problems.
1) As PB mentioned, the codeblocks wizard doesn't support wxWidgets 3.1 yet.
2) from the screenshot, the GCC compiler isn't configured correctly in codeblocks.
Let's try fixing the second one first.
1)From the codeblocks menu, select settings->Compiler.
2)In the resulting dialog, select GNU GCC compiler from the choice box, then select the toolchain executable tab, then hit the auto detect button. You should end up with something like the following (although your folder will be different)
If that fails hit the "..." button, and select "C:\Users\Office\Documents\Omat_ohjelmat\CodeBlocks\MinGW"
3) Select the search directories tab and
- under compiler, add the folder add the folder "C:\Users\Office\Documents\Omat_ohjelmat\CodeBlocks\MinGW\include"
- under linker, add the folder "C:\Users\Office\Documents\Omat_ohjelmat\CodeBlocks\MinGW\lib"
All of that should have been done automatically for you by codeblocks. I don't know why it wasn't.
Thank you everybody for your help! Appreciate it. I did what you adviced New Pagodi and I did get something to happen

but still not quite there yet, this what the build log gave me:

- build_log.png (27.37 KiB) Viewed 2351 times
-
PB
- Part Of The Furniture

- Posts: 2825
- Joined: Sun Jan 03, 2010 5:45 pm
Post
by PB » Fri May 27, 2016 4:29 pm
You did not rename the libraries (30 -> 31) in the linker list, see posts above.
It does pay off to actually read the build log.

-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 4:32 pm
New Pagodi wrote:The fact that the codeblocks wizard doesn't support wxwidgets 3.1 yet was covered in
this post.
In short, from the menu select "Project->Build options". In the resulting popup, select linker settings. Then change any libraries whose names start with "libwxmsw30" to "libwxmsw31".
Okay so I should try older version of wxWidgets then. Here is a screenshot of my linker settings after I changed them from 30->31:

- compiler_2.png (26.1 KiB) Viewed 2349 times
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 4:33 pm
PB wrote:You did not rename the libraries (30 -> 31) in the linker list, see posts above.
It does pay off to actually read the build log.

Haha true x) Thank you, unfortunately the problem remained after I did the change:

-
Attachments
-

- build_log_2.png (27.36 KiB) Viewed 2348 times
-
PB
- Part Of The Furniture

- Posts: 2825
- Joined: Sun Jan 03, 2010 5:45 pm
Post
by PB » Fri May 27, 2016 4:34 pm
jjepsuomi wrote:Okay so I should try older version of wxWidgets then. Here is a screenshot of my linker settings after I changed them from 30->31
You seem to be getting closer, the actual debug build of wxWidgets have "d" in their names, e.g. libwxmsw31u
d_core.a.
It looks like you did not setup the linker search directories (Project build options / Search directories / linker), at least not for the Debug target?
Last edited by
PB on Fri May 27, 2016 4:38 pm, edited 1 time in total.
-
ONEEYEMAN
- Part Of The Furniture

- Posts: 4823
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Post
by ONEEYEMAN » Fri May 27, 2016 4:37 pm
Hi,
@jjepsuomi, sorry for the confusion. It looks like the build created the minimal.exe inside "gcc_mswud" folder.
You can do this:
Code: Select all
cd C:\Users\Office\Documents\Omat_ohjelmat\CodeBlocks\wxWidgets-3.1.0\samplpes\minimal\gcc_mswud
dir
The matter of the fact is: you didn't receive any errors while building it.
@New Pagodi, well I may be wrong. But looking at my MSVC projects for minimal and the output of "./wx-config --cxxflags" on Linux I believe that you should set the include search path to look for the setup.h file.And this path is not wxWidgets/include. Or is it?
Thank you.
-
New Pagodi
- Super wx Problem Solver

- Posts: 380
- Joined: Tue Jun 20, 2006 6:47 pm
-
Contact:
Post
by New Pagodi » Fri May 27, 2016 4:45 pm
jjepsuomi wrote:New Pagodi wrote:The fact that the codeblocks wizard doesn't support wxwidgets 3.1 yet was covered in
this post.
In short, from the menu select "Project->Build options". In the resulting popup, select linker settings. Then change any libraries whose names start with "libwxmsw30" to "libwxmsw31".
Okay so I should try older version of wxWidgets then. Here is a screenshot of my linker settings after I changed them from 30->31:
You can use 3.1, but it just takes an extra step of renaming the libraries. For a static, monolithic, unicode build, debug build the libraries should be:
Code: Select all
libwxmsw31ud.a
libwxpngd.a
libwxjpegd.a
libwxtiffd.a
libwxzlibd.a
For a release version, the libraries should be:
Code: Select all
libwxmsw31u.a
libwxpng.a
libwxjpeg.a
libwxtiff.a
libwxzlib.a
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 5:13 pm
New Pagodi wrote:jjepsuomi wrote:New Pagodi wrote:The fact that the codeblocks wizard doesn't support wxwidgets 3.1 yet was covered in
this post.
In short, from the menu select "Project->Build options". In the resulting popup, select linker settings. Then change any libraries whose names start with "libwxmsw30" to "libwxmsw31".
Okay so I should try older version of wxWidgets then. Here is a screenshot of my linker settings after I changed them from 30->31:
You can use 3.1, but it just takes an extra step of renaming the libraries. For a static, monolithic, unicode build, debug build the libraries should be:
Code: Select all
libwxmsw31ud.a
libwxpngd.a
libwxjpegd.a
libwxtiffd.a
libwxzlibd.a
For a release version, the libraries should be:
Code: Select all
libwxmsw31u.a
libwxpng.a
libwxjpeg.a
libwxtiff.a
libwxzlib.a
Hi Guys, thnx for all the effort, I'm taking in all the advices and fighting to get this thing working x) Here is what I tried now:
Building wxWidgets in debug mode again:
Code: Select all
C:\Users\Office\Documents\Omat_ohjelmat\CodeBlocks\wxWidgets-3.1.0\build\msw
mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=1 UNICODE=1
MinGW just finished building. Here are my Codeblocks settings: (I tried to get as much info as possible)

- info.png (77.26 KiB) Viewed 2334 times
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 5:16 pm
Now I get this in the build log:

- pic6.png (46.33 KiB) Viewed 2334 times
from error to error xD

-
ONEEYEMAN
- Part Of The Furniture

- Posts: 4823
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Post
by ONEEYEMAN » Fri May 27, 2016 5:18 pm
Hi,
Where you able to run the minimal sample?
Thank you.
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 5:19 pm
ONEEYEMAN wrote:Hi,
Where you able to run the minimal sample?
Thank you.
I will give it a shot now. Sorry, there many new things and takes me time not to get too confused ;D
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 5:26 pm
ONEEYEMAN wrote:Hi,
Where you able to run the minimal sample?
Thank you.
This is what I'm going to do next, exactly:
Code: Select all
cd /D C:\Users\Office\Documents\Omat_ohjelmat\CodeBlocks\wxWidgets-3.1.0\build\msw
mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=0 UNICODE=1
cd /D C:\Users\Office\Documents\Omat_ohjelmat\CodeBlocks\wxWidgets-3.1.0\samples\minimal\gcc_mswud
mingw32-make -f makefile.gcc
minimal.exe
When I get all these steps done I will report what happened.
Thank you =)
-
ONEEYEMAN
- Part Of The Furniture

- Posts: 4823
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Post
by ONEEYEMAN » Fri May 27, 2016 5:44 pm
Hi,
Sorry, you build from samples/minimal, and execute from samples/minimal/gcc_mswud.
Thank you.
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 5:52 pm
ONEEYEMAN wrote:Hi,
Sorry, you build from samples/minimal, and execute from samples/minimal/gcc_mswud.
Thank you.
no problem. I will change the build directory and build again =)
-
jjepsuomi
- Knows some wx things

- Posts: 30
- Joined: Fri May 27, 2016 11:41 am
Post
by jjepsuomi » Fri May 27, 2016 5:55 pm
ONEEYEMAN wrote:Hi,
Sorry, you build from samples/minimal, and execute from samples/minimal/gcc_mswud.
Thank you.
Hi,
success! the minimal.exe works! How can I get everything to work on Codeblocks now xD I will try again all the advices given with an earlier version of wxWidgets. If I get things working I will post what I did.

- minimal2.png (61.35 KiB) Viewed 2315 times