User forums > Help

Mac OSX: How can I get it to find "wx"

<< < (2/6) > >>

Game_Ender:
I believe that all Macs have wxMac 2.5 installed by default, so wx-config will give you that one.  I think the Darwin Ports installed wxMac wx-config override this, but you should check.

bnilsson:
How do I use the result?

Auria:
wx-config --cxxflags and friends, will give you the compiler flags required to build wxWidget projects

you'll need to learn what are and where to put compiler flags if you don't know (and your questions makes me think so)

And since you're on mac... you could use the wx framework that comes with your computer with a single flag: -framework wxWidgets (or whatever it's called, i don't know, i don't have it on 10.3)

Since this is Code::Blocks forum, i'm assuming you're using Code::Blocks? Though it seems like you're on mac, and Code::Blocks for mac is kind of early and unstable. If you really want to use it, then just find the area where compiler and linker flags go and paste the right flags there.

Or use the wxWidgets project template. It works fine over here on 10.3.9 computer with wx 2.7. If it doesn't work for you it might be a hint that you didn't install wxWidgets properly? wx-config should really not cause problems... or maybe it's a 10.4 problem

you said you're an absolute beginner in Code::blocks, but are you an absolute beginner in programming in general, or just in Code::blocks?

And how did you install wx?

bnilsson:

--- Quote ---wx-config --cxxflags and friends, will give you the compiler flags required to build wxWidget projects

you'll need to learn what are and where to put compiler flags if you don't know (and your questions makes me think so)

--- End quote ---
Absolutely true.

--- Quote ---
And since you're on mac... you could use the wx framework that comes with your computer with a single flag: -framework wxWidgets (or whatever it's called, i don't know, i don't have it on 10.3)

--- End quote ---

..that comes with my computer..? wxWidgets is not bundled with Mac OS X 10.4.7 as far as I know.


--- Quote ---Since this is Code::Blocks forum, i'm assuming you're using Code::Blocks? Though it seems like you're on mac, and Code::Blocks for mac is kind of early and unstable.

--- End quote ---
Do you suggest I get myself a WinPC and start learing Code::Blocks there, to get a feeling for the "normal" programming enviroment first?

--- Quote ---If you really want to use it, then just find the area where compiler and linker flags go and paste the right flags there.

--- End quote ---
Which brings me to the fundamental question:
Do I need a global variable or a compiler flag to define the meaning of "wx"?

--- Quote ---Or use the wxWidgets project template.

--- End quote ---
That's exactly what I did.
I created a "wxWidgets application" from the template wizard.
Pressing "Build" immidiately gave an error message
"./wx_pch.h     9      error: wx/wxprec.h: No such file or directory"
which led me to assume that wx was not defined since the file existed at the expected location.
I would have expected a wxWidgets template should have included the proper flags if needed. If they had existed but pointed in the wrong direction, I could have found them and modified it accordingly. But there was nothing.

--- Quote ---It works fine over here on 10.3.9 computer with wx 2.7. If it doesn't work for you it might be a hint that you didn't install wxWidgets properly? wx-config should really not cause problems... or maybe it's a 10.4 problem

you said you're an absolute beginner in Code::blocks, but are you an absolute beginner in programming in general, or just in Code::blocks?

--- End quote ---
I have been using CodeWarrior C/C++ for true cross-platform applications on Mac and WinPC for about 15 years.
I have been programming in the unix environment since I got my first Mac OSX, mainly continuing making source code. However, I am unexperienced in the programming environment setup such as  writing Makefiles and understanding a proper gcc command line. I have gone as far as doing ./configure and make on opensource projects found on the net. I have also copied Makefiles from small projects and modified them to work with my own source code, not really understanding everything I've been doing.
I was hoping to port my cross-platform work from MWCW to someting more modern since the MWCW support stopped at OS X SDK 10.3.9.
It looked like Code::Blocks would help me avoiding commandline compiling, at least for a while, and still extend my cross-platform work to unix. I have some tru64 systems at my work that I would like to port some software to. But is teems I might have been too optimistic.

--- Quote ---And how did you install wx?
--- End quote ---
By ./configure --prefix=/opt/local,  make, make install.

bnilsson:

I just want to add that I until recently used CPLAT2 for cross-platform GUI projects, but I have a feeling I have reached the end of that line. However, it worked rather well in the latesr versions. It worked with MWCW8.3 for MacOSX and WinPC, but still incompatible with the latest OSX SDKs and unix environments. Many unix projects that I was working on required headers that just did not fit in this environment, making it impossible to port into such a GUI project.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version