c - Couldn't find function prototypes in a static library on Xcode (linker issue with library) -


i met linker issues when using static libraries.

suppose have 2 c files: example.c , main.c. have example.c generated static library using: gcc -c example.c ar -r libmylibrary.a example.o then, on xcode, add libmylibrary.a following target->build phases->link binary libraries, , library showing in project. specify header search path , library search path. seems that's it. when compile project, linker can find function declaration in relative example.h file, however, not find function prototypes defined in example.c file. why happening? have googled lot , checked many relative questions on stack overflow, nothing helps far...

btw, if use command line this: gcc main.c -lmylibrary -l. -i. –o main work. want work on xcode, can debug conveniently.

thanks in advance!


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -