S
S
SpecCT2011-08-22 13:37:33
MySQL
SpecCT, 2011-08-22 13:37:33

How to connect a third party C++ library to a project in Xcode 4.2?

I am using Xcode 4.2.
Faced the following problem: I can not connect a third-party library to the project.
I want to create a terminal application in C ++ (it will be a server) in conjunction with MySQL. I found a connector on the official MySQL website: www.mysql.com/downloads/connector/cpp/
As far as I understand, this is what I need. But I'll never know how to feed it to Xcode. Rummaged through the Internet - most of the instructions are for Xcode version 3.2+.
Question: How can I connect a third-party C++ library to my project in Xcode 4.2?

Thanks :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MikhailEdoshin, 2011-08-22
@MikhailEdoshin

I won’t tell you about XCode, but I’ll tell you how to do it manually. Since this is C++, then most likely it will need to be recompiled (in fact, they write it themselves). In Mac OS X, when linking, the full path to the library is remembered (which may include special variables @executable_path, @loader_pathand another tricky key) - accordingly, when linking the library, you will need to set this path correctly, depending on where you are going to keep the library. When the library is ready, to link it to the project, you can specify it directly on the command line, or through the -L(директория) -l(краткое имя библиотеки); or, if it is built by the framework, then the keys -F(директория) -framework(имя фреймворка).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question