Author Topic: compiling with wxWidgets  (Read 3558 times)

Offline jdauthre

  • Single posting newcomer
  • *
  • Posts: 4
compiling with wxWidgets
« on: September 07, 2015, 07:17:36 pm »
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

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: compiling with wxWidgets
« Reply #1 on: September 07, 2015, 09:40:15 pm »
you have to add the
 
Code
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: compiling with wxWidgets
« Reply #2 on: September 07, 2015, 09:52:44 pm »
@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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: compiling with wxWidgets
« Reply #3 on: September 07, 2015, 10:11:08 pm »
@jdauthre: Are you able to build some minimal sample on the command line using your newly build wxwidgets?
[...] it works having successfully compiled the wx samples using terminal.
I guess it works.

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.
« Last Edit: September 07, 2015, 10:13:57 pm by jens »

Offline jdauthre

  • Single posting newcomer
  • *
  • Posts: 4
Re: compiling with wxWidgets
« Reply #4 on: September 08, 2015, 12:39:49 pm »
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

Offline jdauthre

  • Single posting newcomer
  • *
  • Posts: 4
Re: compiling with wxWidgets
« Reply #5 on: September 08, 2015, 02:26:25 pm »
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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: compiling with wxWidgets
« Reply #6 on: September 08, 2015, 08:58:39 pm »
Use path without spaces and it will work (rename hello world to something else hello_world for example).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jdauthre

  • Single posting newcomer
  • *
  • Posts: 4
Re: compiling with wxWidgets
« Reply #7 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: compiling with wxWidgets
« Reply #8 on: September 11, 2015, 12:59:51 am »
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.
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