How to create a new wxWidgets project on Snow Leopard?
-
- Experienced Solver
- Posts: 50
- Joined: Sun Dec 05, 2004 2:44 am
How to create a new wxWidgets project on Snow Leopard?
The Wiki says to start from a new Carbon project when creating a WX project. The problem is, XCode 3.2 (Snow Leopard) no long offers Carbon projects as an option. I tried the same steps with new Cocoa project and always get a "Gcc 4.2 returned exit code 1" error message when I try to build. Anyone else have any success create a new WX XCode project?
P.S.
I tried to build the XCode project included in the "minimal" sample and got tons of errors, so I assume that is way outdated.
P.S.
I tried to build the XCode project included in the "minimal" sample and got tons of errors, so I assume that is way outdated.
-
- Experienced Solver
- Posts: 50
- Joined: Sun Dec 05, 2004 2:44 am
Weird. So, you have had success with this? I guess I will have to try, try again.Auria wrote:As i posted in the other thread, you can use pretty much any project, as long as it's an app bundle. So 'cocoa app' will work too.
I delete main.m, and the other .m and .h file, and then add my own main.cpp. That main.cpp compiles, but when I build a target I get a meaningless error about gcc returning exit code 1. I entered all of the lib and cppflag stuff, so I'm baffled. There must be a step that I am missing.
Not working for me.
I built like so:
Makes just fine, but when building the Xcode Project from a Cocoa app and deleting the files from the Classes group folder and changing the main.c to a main.cpp with the sample code. And of course following the Wiki to the T for configuring Xcode, I get 71 errors, that mean nothing to me.
Like so:
Has anyone had success with building an Xcode project from a Cocoa project on Snow Leopard?
Code: Select all
arch_flags="-arch i386"
./configure --disable-shared --enable-unicode CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"
Like so:
Code: Select all
"wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)", referenced from:
wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)in main.o
Symbol(s) not found
Collect2: ld returned 1 exit status
-
- Experienced Solver
- Posts: 50
- Joined: Sun Dec 05, 2004 2:44 am
Re: Not working for me.
Stephan said in a bug report that the wx xcodeproj file is out of date and won't work and to just use make for now.elliswr wrote:I built like so:Makes just fine,Code: Select all
arch_flags="-arch i386" ./configure --disable-shared --enable-unicode CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"
...
Has anyone had success with building an Xcode project from a Cocoa project on Snow Leopard?
As far as converting a Cocoa project into a wx project, one problem that I just discovered is that XCode silently truncates long file paths when you paste in your "wx-config --cppflags" info. So I guess be careful where you put your wx folder to avoid that.
Got it to work... for me
Okay, so went back and started looking at it again, and it boiled down to me selecting the wrong build setting before building and going.
I guess x86_64 (64 bit applications) are not available in wxMac 2.8.10?
At any rate, only changing these settings didn't work:pic 2
I also had to change the actual set to build setting:pic 1
I guess x86_64 (64 bit applications) are not available in wxMac 2.8.10?
At any rate, only changing these settings didn't work:pic 2
I also had to change the actual set to build setting:pic 1
Well you set your architecture setting to be 32/64-bit universal. This means it will build your project as 64 bits too - and your wx is probably not built with 64 bits support in. I think wx 2.9.1/3.0 will support that, but you'd need to check
About the Xcode toolbar menu saying i386... Apple had a good idea when introducing it, but I have no clue what the arch setting does there, it seems to be ignored in all projects created using default wizards.
About the Xcode toolbar menu saying i386... Apple had a good idea when introducing it, but I have no clue what the arch setting does there, it seems to be ignored in all projects created using default wizards.
"Keyboard not detected. Press F1 to continue"
-- Windows
-- Windows
-
- Experienced Solver
- Posts: 50
- Joined: Sun Dec 05, 2004 2:44 am
I finally got it to work! With wx 2.9, I was able to follow these instructions:
http://wiki.wxwidgets.org/Creating_Xcod ... plications
And got it to run, couldn't be happier.
The problem I was having is that XCode doesn't seem to like long path names. I put wx in "/Users/Shared" instead of my desktop and tried again and now all is well.
http://wiki.wxwidgets.org/Creating_Xcod ... plications
And got it to run, couldn't be happier.
The problem I was having is that XCode doesn't seem to like long path names. I put wx in "/Users/Shared" instead of my desktop and tried again and now all is well.