Setup nightmare

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.
Post Reply
paddle
In need of some credit
In need of some credit
Posts: 2
Joined: Sat Oct 12, 2019 4:57 pm

Setup nightmare

Post by paddle » Sat Oct 12, 2019 5:09 pm

Hey guys,

I'm a almost total newbie on codeblocks, and total newbie on wxWidgets. I've struggled for days to setup wxWidgets and it's driving me crazy.

I first tried the 3.1.2 version but the build kept getting errors. Then I started to try with 3.0.4 and could build following this guide :
https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide

I used :

Code: Select all

mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
First problem, tutorial say to rename \lib\gcc_dll into something else. However I don't have this folder. I have gcc_lib.
But I guess it's not a big problem if I don't build again.

Anyway I launch codeblock 17.12. Compiler is GNU GCC x64.
Create new project, wxwidgets project. Fill the setup wizard as explained here :
http://wiki.codeblocks.org/index.php?ti ... wsQuickRef

Then when I try to build I have

Code: Select all

||=== Build: Release in gegergrze (compiler: GNU GCC Compiler(x64)) ===|
ld.exe||cannot find -lwxmsw30u|
ld.exe||cannot find -lwxpng|
ld.exe||cannot find -lwxjpeg|
ld.exe||cannot find -lwxtiff|
ld.exe||cannot find -lwxzlib|
||error: ld returned 1 exit status|
||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 8 second(s)) ===|


Full log are :

Code: Select all


-------------- Build: Release in gegergrze (compiler: GNU GCC Compiler(x64))---------------

x86_64-w64-mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wall -O2 -IC:\wxWidgets-3.0.4\include -IC:\wxWidgets-3.0.4\lib\gcc_lib\mswu -IC:\Users\Pierre\Desktop\test -IC:\wxWidgets-3.0.4\include -c C:\Users\Pierre\Desktop\tgz\cpp\test\gegergrze\gegergrzeApp.cpp -o obj\Release\gegergrzeApp.o
x86_64-w64-mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wall -O2 -IC:\wxWidgets-3.0.4\include -IC:\wxWidgets-3.0.4\lib\gcc_lib\mswu -IC:\Users\Pierre\Desktop\test -IC:\wxWidgets-3.0.4\include -c C:\Users\Pierre\Desktop\tgz\cpp\test\gegergrze\gegergrzeMain.cpp -o obj\Release\gegergrzeMain.o
x86_64-w64-mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wall -O2 -IC:\wxWidgets-3.0.4\include -IC:\wxWidgets-3.0.4\lib\gcc_lib\mswu -IC:\Users\Pierre\Desktop\test -IC:\wxWidgets-3.0.4\include -c C:\Users\Pierre\Desktop\tgz\cpp\test\gegergrze\GUIDialog.cpp -o obj\Release\GUIDialog.o
windres.exe -IC:\wxWidgets-3.0.4\include -IC:\wxWidgets-3.0.4\lib\gcc_lib\mswu  -J rc -O coff -i C:\Users\Pierre\Desktop\tgz\cpp\test\GEGERG~1\resource.rc -o obj\Release\resource.res
x86_64-w64-mingw32-g++.exe -LC:\wxWidgets-3.0.4\lib\gcc_lib -o bin\Release\gegergrze.exe obj\Release\gegergrzeApp.o obj\Release\gegergrzeMain.o obj\Release\GUIDialog.o  obj\Release\resource.res -s -mthreads  -lwxmsw30u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 "C:\Program Files (x86)\CodeBlocks\MinGW\lib\libuxtheme.a" "C:\Program Files (x86)\CodeBlocks\MinGW\lib\liboleacc.a" -mwindows
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxmsw30u.a when searching for -lwxmsw30u
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib\libwxmsw30u.a when searching for -lwxmsw30u
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxmsw30u.a when searching for -lwxmsw30u
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw30u
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxpng.a when searching for -lwxpng
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib\libwxpng.a when searching for -lwxpng
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxpng.a when searching for -lwxpng
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxpng
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxjpeg.a when searching for -lwxjpeg
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib\libwxjpeg.a when searching for -lwxjpeg
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxjpeg.a when searching for -lwxjpeg
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxjpeg
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxtiff.a when searching for -lwxtiff
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib\libwxtiff.a when searching for -lwxtiff
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxtiff.a when searching for -lwxtiff
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxtiff
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxzlib.a when searching for -lwxzlib
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib\libwxzlib.a when searching for -lwxzlib
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\wxWidgets-3.0.4\lib\gcc_lib/libwxzlib.a when searching for -lwxzlib
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxzlib
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 8 second(s))
6 error(s), 0 warning(s) (0 minute(s), 8 second(s))
 
If someone can help finding the issue there it would really help me out.

It's actually the second time I tried to use CB&wxwidgets but the first time I just gave up because I could not do the setup. I can't say the setup process is very new-user-friendly.

User avatar
doublemax
Moderator
Moderator
Posts: 14075
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Setup nightmare

Post by doublemax » Sat Oct 12, 2019 5:24 pm

Please try this guide: viewtopic.php?f=19&t=46125

It's up-to-date and quite detailed.
Use the source, Luke!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3464
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Setup nightmare

Post by ONEEYEMAN » Sat Oct 12, 2019 10:45 pm

Hi,
First - don't do a monolithic build of wxWidgets.
Second - you C::B project options absolutely has to match the options you build wxWidgets with. Otherwise you will have a lot of issues.

Thank you.

paddle
In need of some credit
In need of some credit
Posts: 2
Joined: Sat Oct 12, 2019 4:57 pm

Re: Setup nightmare

Post by paddle » Mon Oct 14, 2019 2:53 pm

Hi,
Thanks for your replies.
First - don't do a monolithic build of wxWidgets.
Second - you C::B project options absolutely has to match the options you build wxWidgets with. Otherwise you will have a lot of issues.
1- Not sure why there is this monolithic option if it should not be used..? Maybe it would best to remove all reference to it if it don't work.
2- Yes I got that. I selected unicode/monolithic/dll as required.

I tried to start over, following the tutorial you linked. Only difference was that I used 3.0.4, have not built the debug version of wx. And i used monolithic.

And I kept having the same errors.

Today I tried on another computer which is win7 32bit.
I followed the tutorial exactly. Using 3.1.2. Built the debug and release both. Every step have been done.
I could built minimal from CMD as explained in the tutorial.

But on CB new project still don't build. But now with different errors :
undefined reference to `jpeg_resync_to_restart'
undefined reference to `jpeg_std_error'
undefined reference to `jpeg_destroy_decompress'
...

Ok I cannot even paste the logs as I get the error from forum :
"Forbidden. Message seems to be spam."

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3464
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Setup nightmare

Post by ONEEYEMAN » Mon Oct 14, 2019 3:30 pm

Hi,
Monolithic build will not gain you anything - just more headache in the future. ;-)
So, when you start over - what command did you use to build wxWidgets?
Also - it is good that you are able to build and run minimal sample. It means that it works.

And it would be nice if you can post a screenshots from the C::B wizard with what options you selected, when creating the project.

Thank you.

Post Reply