tags:

views:

214

answers:

2

I only have ssh access to a Mac OSX 10.6 computer, so, Xcode is out of scope. Currently, I have trouble to figure out the right format of g++ output: do I need to append -shared and -fPIC, or -dynamiclib or other magic flag in order to get a firefox recognizable binary?

+1  A: 

I use the following:

  • -dynamiclib
  • -fPIC
  • -arch foo as needed
  • -DXP_MAC=1, -DXP_MACOSX=1 etc.
  • -framework UsedFrameWork as needed
  • -mmacosx-version-min=10.x if needed

Also remember to put it all in a plugin bundle and to include a suitable plist.

Georg Fritzsche
thanks! I am relatively new to mac plugin (or mac development in general), can you refer me some links that explain what bundle is here?
liuliu
Bundles are a directory structure in that your binary and related resources reside - Apples documentation explains it in some detail: http://developer.apple.com/mac/library/documentation/CoreFoundation/Conceptual/CFBundles/Introduction/Introduction.html
Georg Fritzsche
By the way, if you haven't found it yet, Apple also has a browser-plugin-in overview: http://www.devworld.apple.com/mac/library/documentation/InternetWeb/Conceptual/WebKit_PluginProgTopic/WebKitPluginTopics.html
Georg Fritzsche
A: 

It should also be noted that you can compile something using xcode from the command line using xcodebuild.

Taxilian