Building a library in Xcode for use with BlitzMax

Archives Forums/MacOS X Discussion/Building a library in Xcode for use with BlitzMax

JoshK(Posted 2011) [#1]
I am new to OSX. I have a project for a Cocoa application. I want to add a target so that I can compile it as a library BlitzMax can load and call commands from. I would prefer to build a static library, but the Mac equivalent to a Windows .dll will work just as well.

Is there a type of precompiled library that works better with BlitzMax?

How can I compile my Xcode project into a library, without creating an entirely new project file? The project is quite large.


*(Posted 2011) [#2]
One thing you might look at is dylib's I dont know if they are BlitzMax supported I think it only uses mod files.


jkrankie(Posted 2011) [#3]
.dylib is the Mac equivalent of a .dll, and yes, you should be able to use them with Blitzmax in a similar fashion to a .dll. Brucey has a few modules that use them, so you could take a look there and see how he does it.

Cheers
Charlie


JoshK(Posted 2011) [#4]
Here's what I found so far:
-Build a static lib, not a dynamic one.
-Set the architecture to 32-bit.

Fortunately, it seems that a Cocoa static lib doesn't have any issues playing with a BlitzMax program, so far.