c - Mac OS X Sierra : Undefined symbols for architecture x86_64 -


i trying build c source file based on linphone in mac os x sierra getting following error.

this link c source file. http://www.linphone.org/docs/liblinphone/group__basic__call__tutorials.html

edited:

i trying compile source code command

clang -o tt tt.c -i/users/softdev/downloads/linphone-sdk-3.11.1-mac/include/

error:

undefined symbols architecture x86_64
ld: symbol(s) not found architecture x86_64
clang: error: linker command failed exit code 1 (use -v see invocation)

i have tried change target cpu didn't work.

my system has xcode 8. regarding appreciated.

edited: complete output

 undefined symbols architecture x86_64:   "_linphone_call_get_state", referenced from:       _main in tt-ca2045.o   "_linphone_call_ref", referenced from:       _main in tt-ca2045.o   "_linphone_call_unref", referenced from:       _main in tt-ca2045.o   "_linphone_core_destroy", referenced from:       _main in tt-ca2045.o   "_linphone_core_invite", referenced from:       _main in tt-ca2045.o   "_linphone_core_iterate", referenced from:       _main in tt-ca2045.o   "_linphone_core_new", referenced from:       _main in tt-ca2045.o   "_linphone_core_terminate_call", referenced from:       _main in tt-ca2045.o   "_ms_usleep", referenced from:       _main in tt-ca2045.o ld: symbol(s) not found architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) 

i got sample code compile using this:

clang -o hello hello.c -ilinphone-sdk-3/include -llinphone-sdk-3/lib -llinphone -lmediastreamer_base 

clang's -i parameter points header (.h) files live

and additions, -l specifies path clang lib files live. in case, might live in -l/users/softdev/downloads/linphone-sdk-3.11.1-mac/lib

then -l specifies dylibs want include (strip off lib prefix , dylib suffix).

lastly, need add missing line sample code pointed to. add:

#include <unistd.h> 

after signal.h


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -