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

webhunter

macrumors newbie
Original poster
Oct 30, 2010
3
0
I want to create a simple dynamic library with four or five methods that are implemented in a mix of c++ and objective-c . I also want to implement an application that uses this library. Both things should be created with XCode in one project (with different targets).

I've been working on this problem a long long time now, but I can't get it right. What steps need to be performed to create a dynamic library - for example with one function that prints "hello world" - and a console application that uses the .dlib in XCode?

Thanks a lot!!
 
If you're only targeting Mac OS X, why not use a framework? Lots of documentation for that. Plus they're nice if you have resources or headers you want to bundle with the code.
 
Last edited:
Thank you for your fast reply!
Hm...later on I need to link this library to different applications, that run on different operating systems (from Mac OS X 10.4 upwards with different architectures). If this can be done with a framework as well, it would be an opportunity?!
 
Thank you for your fast reply!
Hm...later on I need to link this library to different applications, that run on different operating systems (from Mac OS X 10.4 upwards with different architectures). If this can be done with a framework as well, it would be an opportunity?!

When you say "different operating systems", do you mean different versions of the same operating system (Mac OS X)? Because every version of OS X has supported frameworks. If you want to use it for Linux, Windows, WebOS, whatever, you would have to compile separate files (.dll, .so, etc) for each one.
 
I meant Mac OS with different versions (version 10.4 upwards).
Okay, so maybe a framework would fit my requirements. I'm going to try this out.
Thank you so far
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.