Author Topic: Compiling a wxwidgets project in Code:Blocks in Mac OS X  (Read 4690 times)

Offline mimosa

  • Single posting newcomer
  • *
  • Posts: 6
Compiling a wxwidgets project in Code:Blocks in Mac OS X
« on: October 22, 2014, 07:39:03 am »
Hello!
wxWidgets version: 3.0.2
Codeblocks version: 13.12 32bit build Dec 27 2013 with wx2.8.12 (Mac OS X unicode)
Compiler: gcc for Xcode Apple LLVM version 6.0 (Target x86_64-apple-darwin13.4.0)
platform/OS: Mac OS X 10.9.5 (64 bit)

I am trying to compile a simple Wxwigets project in Code::Blocks and I get this error right away:
fatal error 'wx/app.h' file not found.

I do have the Global variable "wx" defined as such:
/Users/mathieu/wxWidgets-3.0.2

and in a terminal when I type "wx-config --cflags" I get:
-I/usr/local/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__

which is the proper response I believe. But something is wrong somwehere and Code::Blocks does not recognize either wx-config command or something else. I need help.. Thank you!

wxwidgets compiles without any issues and I am able to compile and run few samples.
Also, I did installed the 'command line tool' for OS X.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Compiling a wxwidgets project in Code:Blocks in Mac OS X
« Reply #1 on: October 22, 2014, 09:26:01 am »
Start reading this http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Why are you mixing wx global variable and wx-config? I think you should use one or the other.
Defining wx to /Users/mathieu/wxWidgets-3.0.2 is probably wrong (just a guess, because I don't know why you're using it).
(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 mimosa

  • Single posting newcomer
  • *
  • Posts: 6
Re: Compiling a wxwidgets project in Code:Blocks in Mac OS X
« Reply #2 on: October 27, 2014, 10:13:21 pm »
I didn't know I was not suppose to "mix" them.. assuming Code::Blocks would use privilege one over the other. I tried removing the Global variable "wx" all together, and still cannot compile. Same error. If mixing both is an issue for code::blocks, the error should have said that.. (like "redefinition of variable" or whatever, but the problem does not lie on the fact that I had 'wx' defined in the global variables, as I just tried removing it).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7592
    • My Best Post
Re: Compiling a wxwidgets project in Code:Blocks in Mac OS X
« Reply #3 on: October 27, 2014, 10:23:35 pm »
FYI: we can NOT help you till you post the build log!

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