creating an application bundle with xcode and using wxwidgets

106 views
Skip to first unread message

Eric

unread,
Sep 3, 2004, 5:05:34 PM9/3/04
to wx-u...@lists.wxwidgets.org

I had a target in xcode that I was using just for testing. I ran it
from the command line and it opened a wxwindow and ran fine. Now I
need to add more things to it and turn it into a bundle. So I created
another target as a cocoa application bundle. Well now when I try and
compile it says, /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:56:
error: parse error before `@' token. This error cause lots of other
errors and there are more errors similar to this also. I have well
over 1000 errors. Well the @ symbol means external class in objective
C, but for some reason it is not compiling it. I can do this with
wxwidgets right? Wxwidgets 2.5.2 being c++ and apple's stuff being
objective C isn't a problem is it? I have tried adding -ObjC++ to
the cflags, but that did not help. I have used wxwidgets 2.4.2 and
apple's frameworks fine before. Although that was with a make file
and g++ not xcode and g++.

Ryan Wilcox

unread,
Sep 3, 2004, 5:24:59 PM9/3/04
to wx-u...@lists.wxwidgets.org
Eric wrote:

> I had a target in xcode that I was using just for testing. I ran it
> from the command line and it opened a wxwindow and ran fine. Now I
> need to add more things to it and turn it into a bundle. So I created
> another target as a cocoa application bundle.

Thoughts:
* Unless you're using wxCocoa, you should have choosen the
Carbon Application Bundle

* I thought compiling Carbon apps with XCode (in general) that
they were bundled?

* Perhaps in CVSHEAD wxCarbon apps are bundled by default? I'm
fairly certain this is the case because they got rid of the
need for including the resource forks for your wxWindows apps
fairly recently (a month ago or so?). So it might be there

Hope this helps,
_Ryan Wilcox


Eric

unread,
Sep 7, 2004, 9:54:46 AM9/7/04
to wx-u...@lists.wxwidgets.org

ryanw...@mac.com (Ryan Wilcox) wrote in message news:<4138E12B...@mac.com>...

> Thoughts:
> * Unless you're using wxCocoa, you should have choosen the
> Carbon Application Bundle
>
My linker flags are:
-ltiff -liconv -lwx_mac_gl-2.5 -lwx_base_carbon-2.5
-lwx_base_carbon_net-2.5 -lwx_base_carbon_xml-2.5 -lwx_mac_core-2.5
-lwx_mac_adv-2.5 -lwx_mac_html-2.5 -framework Carbon -framework Cocoa
-framework WebKit -framework System -framework OpenGL -framework AGL
-framework Foundation -framework AppKit
I will try and remove all the carbon links and see if that works. I
just typed in what wx-config --libs gave me. I don't seem to have a
libwx_cocoa though only libwx_mac_core and libwx_mac_adv. Do I link
to those to for wxCocoa.

> * I thought compiling Carbon apps with XCode (in general) that
> they were bundled?
>

This is my first time using XCode so I don't know.

> * Perhaps in CVSHEAD wxCarbon apps are bundled by default? I'm
> fairly certain this is the case because they got rid of the
> need for including the resource forks for your wxWindows apps
> fairly recently (a month ago or so?). So it might be there
>

I am using the 2.5.2 tar file that is availble on the website.

> Hope this helps,
> _Ryan Wilcox
>
>

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
> For additional commands, e-mail: wx-use...@lists.wxwidgets.org

Ryan Wilcox

unread,
Sep 7, 2004, 10:21:15 AM9/7/04
to wx-u...@lists.wxwidgets.org
Eric wrote:
> ryanw...@mac.com (Ryan Wilcox) wrote in message news:<4138E12B...@mac.com>...
>I don't seem to have a
> libwx_cocoa though only libwx_mac_core and libwx_mac_adv. Do I link
> to those to for wxCocoa.

libwx_cocoa is cocoa stuff, while libwx_mac_core and libwx_mac_adv are
wxMac stuff.

Are you trying to build your own project file in XCode? It's really
recommended that you just copy the minimal.xcode project in samples/minimal/

HTH,
_Ryan Wilcox

Eric

unread,
Sep 7, 2004, 4:24:35 PM9/7/04
to wx-u...@lists.wxwidgets.org

ryanw...@mac.com (Ryan Wilcox) wrote in message news:<413DC3DB...@mac.com>...

>
> libwx_cocoa is cocoa stuff, while libwx_mac_core and libwx_mac_adv are
> wxMac stuff.
>
I don't have libwx_cocoa installed. I guess I didn't pass the right
flags when I compiled it. If libwx_mac_core libwx_mac_adv are wxMac
stuff (carbon?). What is libwx_base_carbon? I am pretty sure this is
carbon stuff, so what exactly is wxMac stuff.

> Are you trying to build your own project file in XCode? It's really
> recommended that you just copy the minimal.xcode project in samples/minimal/
>

I am building my on project. Figured I could learn more that way. I
created a new target for a Carbon bundle and that is working fine. I
read that wxCocoa still needs some work, so I thought Carbon would be
better for OS X anyway.

> HTH,

Reply all
Reply to author
Forward
0 new messages