Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to compile .so file through xcode?

I can compile my program trough the shell with the following command lines:

g++ -c -I$RMANTREE/include myplugin.cpp
g++ -bundle -undefined dynamic_lookup myplugin.o -o myplugin.so

How do I use xcode to do this?
Which project should I start with?
How do I add the include path?

Mac OS X (10.6.1)

Posted on Oct 12, 2009 12:20 PM

Reply
Question marked as Best reply

Posted on Oct 13, 2009 12:00 PM

There are several options regarding the project template to use. You could create an External Build System project (in the Other section in Xcode 3.2) and supply a makefile. This option is the closest to building from the command line.

Plugins normally use the Bundle project, which is in the Framework and Library section in Xcode 3.2. You can use either the Cocoa or Core Foundation framework. For C++ you should use the Core Foundation framework. If you're not building a plugin, the other project templates to look into are the STL C++ Library and Command-Line Tool projects.

To add an include path to an Xcode project, choose Project > Edit Build Settings. Click the Build tab in the inspector to see the project's build settings. The Search Paths build settings collection is where you add search paths for headers, libraries, and frameworks. Add your include path to the Header Search Paths build setting.
2 replies
Question marked as Best reply

Oct 13, 2009 12:00 PM in response to kosmo.yin

There are several options regarding the project template to use. You could create an External Build System project (in the Other section in Xcode 3.2) and supply a makefile. This option is the closest to building from the command line.

Plugins normally use the Bundle project, which is in the Framework and Library section in Xcode 3.2. You can use either the Cocoa or Core Foundation framework. For C++ you should use the Core Foundation framework. If you're not building a plugin, the other project templates to look into are the STL C++ Library and Command-Line Tool projects.

To add an include path to an Xcode project, choose Project > Edit Build Settings. Click the Build tab in the inspector to see the project's build settings. The Search Paths build settings collection is where you add search paths for headers, libraries, and frameworks. Add your include path to the Header Search Paths build setting.

How to compile .so file through xcode?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.