0

I'm having this annoying problem. I'm doing an ios app in objective-c++. I'm coding the backbone of the app in c++ and the UI in objective-c, because the app is most likely going to be ported to Android (maybe also wp) at a later point. The setup works just fine... That is, until I want to include some c/c++ libraries.

The app is going to do a lot of requests to web services and therefore I've decided to include the libcurl library. I have downloaded the library, configured it and "made" it and it is installing just fine in /usr/local/lib and /usr/local/include. I have added the libcurl.a/libcurl.dylib to the project, but here comes the problem: When I want to include it in the .h or .cpp (or .mm) file it says that the file is missing fx.

#include "curl/curl.hpp" // -or similar according to library, always returns "file not found"

The intellisense is also not suggesting the files/libraries when typing. I have also tried with the libcurlpp and Poco libraries which all installs just fine and are added to the project just fine (via Build phases -> Link Binaries with Libraries), but is not recognized in the code. I have also build libcurl specific for ios via this link:

http://home.comcast.net/~seiryu/libcurl-ios.html

and again everything is working regarding building and installing the library, but again I can't include it in the code...

I really hope it's just because I'm retarded at this and that it is some sort of setting I have missed or don't know about. Searched all over the web now and tried different solutions, all with the same result. I must be including the libraries wrong in some way...?

P.S. I've also tried adding the OS provided libcurl.4.dylib, with same result. Can't include it in the code.

Elechtron
  • 179
  • 3
  • 6
  • what is a objective c + +? a new language? – Adrian P Aug 28 '13 at 18:52
  • objective-c and c++ mixed. http://stackoverflow.com/questions/3684112/what-is-objective-c-and-can-i-use-this-language-in-xcode – Elechtron Aug 28 '13 at 19:22
  • Did you cross-compile it for iOS? You need to set header and library search paths for each architecture - iOS and Simulator. The better approach is certainly to create an Xcode project and let Xcode build the various binaries for the architectures. How to setup a static library, build it and link the binary in a target app, is certainly already explained elsewhere. – CouchDeveloper Aug 28 '13 at 22:25

0 Answers0