View Full Version : Linking to libraries in Xcode
vatel
Jun 4, 2005, 01:54 AM
I'm new to XCode, so this is a pretty basic question.
I am trying to build a C++ console app, and I can't figure out how to get the linker to use the necessary libraries. I couldn't find any info on what to do with libraries in the documentation, so I dumped them into the source for the project, but that doesn't seem to work, as I get a whole list of missing symbols from the link.
Help.
Loge
Jun 4, 2005, 02:42 PM
I think within Xcode, you need to choose File | New Project..
then from the list, choose
Command Line Utility, C++ Tool.
This should set up your project to link with the required libraries, then you can change the boilerplate main.cpp file to create your command line program.
superbovine
Jun 4, 2005, 03:22 PM
I think within Xcode, you need to choose File | New Project..
then from the list, choose
Command Line Utility, C++ Tool.
This should set up your project to link with the required libraries, then you can change the boilerplate main.cpp file to create your command line program.
just make a makefile in your src directory then edit the active target.
AlmostThere
Jun 6, 2005, 04:44 AM
Assuming you have the project set up for c++ compiling, further libraries can be added under Groups and Files.
Under the Project Group in groups and files, right click on External Frameworks and Libraries and choose Add -> Existing Files and then navigate to the library you want. If you require some common functionality, Apple probably produce a "Framework" which drags libraries, headers and any other resources you need into your project.
It really is very easy.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.