Compaile Problem - setup.h

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
mglowinsk93
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Jan 13, 2018 5:08 pm

Compaile Problem - setup.h

Post by mglowinsk93 » Sat Jul 21, 2018 4:44 pm

Hi,
i've problem with wxWidget Project Compilation. I'm using CodeBlocks 17.12 and wxWidget 3.0.4.
After build try i'm redirected to platform.h header file and there is a notification that wx/setup.h do not exists.


Build log:

Code: Select all

D__WXDEBUG__ -std=c++14 -IC:\wxWidgets-3.0.4\include -IC:\wxWidgets-3.0.4\lib\gcc_dll\mswud -IC:\local\boost_1_66_0 -IC:\wxWidgets-3.0.4\include -ID:\C++\Wx_Widget\BasicApp\BasicApp -c D:\C++\Wx_Widget\BasicApp\BasicApp\BasicAppApp.cpp -o obj\Debug\BasicAppApp.o
In file included from C:\wxWidgets-3.0.4\include/wx/defs.h:27:0,
                 from C:\wxWidgets-3.0.4\include/wx/wxprec.h:12,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
C:\wxWidgets-3.0.4\include/wx/platform.h:183:23: fatal error: wx/setup.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I checked if this file exists in C:\wxWidgets-3.0.4\include\wx, but no. It's not there.
It's located in C:\wxWidgets-3.0.4\include\msvc\wx.

Warnings which i get during creating project:
Warning 1.jpg
Warning 1.jpg (28.44 KiB) Viewed 942 times
Warning 2.jpg
Warning 2.jpg (28.37 KiB) Viewed 942 times
PATH:

Code: Select all

C:\windows\system32;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\OpenSSH\bin;C:\Python27;C:\Users\Mateusz\AppData\Local\Programs\Python\Python36-32;
Compiler version:

Code: Select all

gcc (tdm-1) 5.1.0
Flags:
Flags included.jpg
Any tips how i can solve this problem:)?
Last edited by mglowinsk93 on Sun Jul 22, 2018 5:03 am, edited 1 time in total.

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

Re: Compaile Problem - setup.h

Post by doublemax » Sat Jul 21, 2018 4:59 pm

The settings in your CB project must match the configuration wxWidgets was build with.

Code: Select all

C:\wxWidgets-3.0.4\lib\gcc_dll\mswud
This line indicates a debug build with wxWidgets linked dynamically (as DLLs).

Did you build wxWidgets yourself? Which configurations?

This post also explains it:
viewtopic.php?p=169501#p169501
You don't need to use the exact same settings as in this post, it's just important that they match.
Use the source, Luke!

mglowinsk93
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Jan 13, 2018 5:08 pm

Re: Compaile Problem - setup.h

Post by mglowinsk93 » Sun Jul 22, 2018 5:04 am

I don't have folder like

Code: Select all

C:\wxWidgets-3.0.4\lib\gcc_dll\mswud
I've something like

Code: Select all

C:\wxWidgets-3.0.4\lib\gcc_lib\mswu
Does it mean that wxWidget compile went wrong?

Yes, i built wxWidget myself. Compile command which i used:

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1
I tried to use the command below, but it was not working:

Code: Select all

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
build.cfg content:

Code: Select all

WXVER_MAJOR=3 
WXVER_MINOR=0 
WXVER_RELEASE=4 
BUILD=release 
MONOLITHIC=0 
SHARED=0 
UNICODE=1 
TOOLKIT=MSW 
TOOLKIT_VERSION= 
WXUNIV=0 
CFG= 
VENDOR=custom 
OFFICIAL_BUILD=0 
DEBUG_FLAG=1 
DEBUG_INFO=default 
RUNTIME_LIBS=dynamic 
MSLU=0 
USE_EXCEPTIONS=1 
USE_RTTI=1 
USE_THREADS=1 
USE_AUI=1 
USE_GUI=1 
USE_HTML=1 
USE_MEDIA=1 
USE_OPENGL=1 
USE_QA=0 
USE_PROPGRID=1 
USE_RIBBON=1 
USE_RICHTEXT=1 
USE_STC=1 
USE_WEBVIEW=1 
USE_XRC=1 
COMPILER=gcc 
COMPILER_VERSION= 
CC=gcc 
CXX=g++ 
CFLAGS= 
CPPFLAGS= 
CXXFLAGS= 
LDFLAGS= 
CodeBlocks Project settings:
Page 1.jpg
Page 1.jpg (49.1 KiB) Viewed 900 times
Page 2.jpg
Page 2.jpg (59.25 KiB) Viewed 900 times
Page 3.jpg
Page 3.jpg (55.48 KiB) Viewed 900 times
Last edited by mglowinsk93 on Sun Jul 22, 2018 5:11 am, edited 6 times in total.

mglowinsk93
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Jan 13, 2018 5:08 pm

Re: Compaile Problem - setup.h

Post by mglowinsk93 » Sun Jul 22, 2018 5:04 am

Page 4.jpg
Page 4.jpg (49.6 KiB) Viewed 900 times
Page 5.jpg
Page 5.jpg (67.91 KiB) Viewed 900 times
Page 6.jpg
Page 6.jpg (66.67 KiB) Viewed 900 times

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

Re: Compaile Problem - setup.h

Post by doublemax » Sun Jul 22, 2018 7:30 am

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1
SHARED=0 means "link wxWidgets statically". But you checked "Use wxWidgets DLLs" in the project configuration. You either have to rebuild wxWidgets with the correct setting or change the project configuration.

Also, do you only build the release version? Then you should also build the debug version (BUILD=debug).
Use the source, Luke!

mglowinsk93
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Jan 13, 2018 5:08 pm

Re: Compaile Problem - setup.h

Post by mglowinsk93 » Thu Jul 26, 2018 9:14 pm

Yes, i built only RELEASE version.
I decided to rebuild a whole wxWidget.

I used command:

Code: Select all

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release clean
I got Error 2.
Clean failed.jpg
I tried this command:

Code: Select all

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
First command.jpg
First command.jpg (73.07 KiB) Viewed 785 times

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1
Failed command 3.jpg

mglowinsk93
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Jan 13, 2018 5:08 pm

Re: Compaile Problem - setup.h

Post by mglowinsk93 » Thu Jul 26, 2018 9:56 pm

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0
Command 2.jpg

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=debug UNICODE=1 SHARED=0
Command 2 debug.jpg


Was it compiled properly?

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

Re: Compaile Problem - setup.h

Post by doublemax » Thu Jul 26, 2018 10:33 pm

Was it compiled properly?
No.

Did you change anything else? Install another compiler version of anything like that?

If this command worked:

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1
Then this should work, too:

Code: Select all

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1 SHARED=0
Use the source, Luke!

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 269
Joined: Fri Nov 03, 2006 2:00 pm

Re: Compaile Problem - setup.h

Post by stahta01 » Fri Jul 27, 2018 11:29 am

Note: When you change the value of "MONOLITHIC" I have had to delete the files because make clean has always failed for me.

Tim S.

Post Reply