Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zrbecker

macrumors member
Original poster
Jun 28, 2009
58
0
I am trying to build a c++ program I wrote as a stand alone .app that I can distribute. I didn't notice till now that it is just building a unix executable.

I am using Xcode 4.

Also if my program has dependencies on libraries can I package them with the app or do I have to get people to install the libraries?

Thanks.
 
Easiest way is to create a new Cocoa application Xcode project, and then strip out all the source code, resources and frameworks and add in your source files.

To package libraries you need to build them as frameworks or dylibs and setup Copy Build Phases to copy them into your .app.

What does your C++ app do? If you don't have a GUI might be better to use Package Maker and create an installer that installs the libraries and your executable.
 
It is an allegro application.

I try building it as a framework using cmake, but I couldn't get the framework to work correctly. I'll check out the link posted and the dylibs thing. Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.