c++ - Xcode5: link aws4c library -
i have c++ project in xcode
i use c library aws4c in https://code.google.com/p/aws4c/
here apn.cpp file:
#include "aws4c.h" ... int main(int argc, char *argv[]) { aws_init(); ... } in xcode looks ok, when i'm trying build - error
undefined symbols architecture x86_64: "aws_init()", referenced from: _main in apn.o ld: symbol(s) not found architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) what right way link c library c++ project in xcode5?
resolved this
added
#ifdef __cplusplus extern "c" { #endif and
#ifdef __cplusplus } #endif to aws4c.h file , works
Comments
Post a Comment