Using an external API in my xcode project (newbie)

jakubdudek

Registered
Greetings,

I am new to xcode and not exactly a software pro either (I am a hardware designer). I hope someone can point me to good information for the following.

I am trying to build a simple GUI using xcode and interface builder. This GUI needs to be able to call function from an API provided by a hardware vendor. The whole idea is to control the hardware with a custom GUI. The API comes in a few format: There is a c++/h/dll set of files, and there is also a java jar/dll set of files. I'm leaning towards the c++ because I have no Java experience, but I'm open to suggestions.

I can manage to build a simple GUI with some controls using a few xcode tutorials. Essentially my question is how to go about integrating the vendor API and being able to access it's functions from my code. If anyone could point me to some documentation about how to proceed, i would appreciate it.

Thanks.
 
DLLs will not work on Mac OS X. You will first need a Mac dynamic library. If the hardware vendor does not provide a Mac dynamic library or framework, you will have to create it yourself. The vendor may provide a makefile to build the library from source. If they don't, you will have to create a dynamic library project in Xcode and add the C++ and header files to the project. Build the project to create the library.

After creating the library, add it to your application project. Include the vendor's header files in your source code, and you should be able to use the vendor's API in your code. You will have to add search paths to the library and header files for Xcode to be able to build your application. Choose Project > Edit Project Settings to access the build settings. The Search Paths collection is where you add the search paths.
 
Back
Top