I am new to both codeblocks and compiling (on a MAC) I have compiled wxwidgets successfully and it works having successfully compiled the wx samples using terminal. I have put in all the paths etc that came up using wx-config. When I try and compile a project in codeblocks I get:
...../wxWidgets-3.0.2/include/wx/platform.h|183|fatal error: 'wx/setup.h' file not found|. I have googled for ages and can't find a solution. I am using Mavericks osx and wxWidgets 3.0.2. Can anyone help?
Thanks
you have to add the
wxWidgets-X.X.X\lib\SOMETHING\OTHER_SOMETHING
to the include directories in your project. X.X.X is your wx Version SOMETHING is your build configuration (static or not ecc.) and OTHER_SOMETHING is probably "mac",, but i have no idea (on windows it is msw)
greetings
@BlueHazzard: This is a windows only thing. On Unix wx-config should handle this automatically.
@jdauthre: Are you able to build some minimal sample on the command line using your newly build wxwidgets?
Quote from: oBFusCATed on September 07, 2015, 09:52:44 PM
@jdauthre: Are you able to build some minimal sample on the command line using your newly build wxwidgets?
Quote from: jdauthre on September 07, 2015, 07:17:36 PM
[...] it works having successfully compiled the wx samples using terminal.
I guess it works.
Quote from: jdauthre on September 07, 2015, 07:17:36 PM
I have put in all the paths etc that came up using wx-config. When I try and compile a project in codeblocks I get:
...../wxWidgets-3.0.2/include/wx/platform.h|183|fatal error: 'wx/setup.h' file not found|. I have googled for ages and can't find a solution. I am using Mavericks osx and wxWidgets 3.0.2. Can anyone help?
Thanks
Did you use wx-config or did you add the paths manually (this is error-prone).
If the second:try the wxWidgets-wizard and fix the paths to wx-config if needed.
Thanks, steep learning curve, I used wx-config to get the paths and put them in manually, I didn't know that can be done automatically, I will give that a try if I can find out how to do
Okay progress of sorts, I dont get the error message any more. Using the 'hello world' tutorial, I get the following error message:
++ -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g 'wx-config --cxxflags' -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX_COCOA__ -D_DWXUSINGDLL -D_WXOSX -c "/Users/james/Documents/c++/hello world/wx_pch.h" -o wx_pch.h.gch/Debug_wx_pch_h_gch
clang: error: no input files
I made sure the project and files were saved and wx_pch.h certainly exists in that location obviously I am missing something...
Use path without spaces and it will work (rename hello world to something else hello_world for example).
Sadly that didn't work, Earlier I did attempt to add some global path variables viia terminal, so I will attempt to remove them (will have to find out how!), any other ideas?
Quote from: jdauthre on September 09, 2015, 10:25:11 PM
Sadly that didn't work, Earlier I did attempt to add some global path variables viia terminal, so I will attempt to remove them (will have to find out how!), any other ideas?
Stop trying to use Precompiled Header with Clang.
Tim S.