1
另一個符號(S)沒有發現問題與Mac OS X我寫了一個使用libev事件循環庫,當編譯產生這樣的輸出一個C程序:編譯和Mac OS X上聯libev
$ make
clang midnight.c midnight_logging.c -o midnight
Undefined symbols for architecture x86_64:
"_ev_default_loop", referenced from:
_main in midnight-Wlcawk.o
"_ev_io_start", referenced from:
_main in midnight-Wlcawk.o
"_ev_run", referenced from:
_main in midnight-Wlcawk.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [midnight] Error 1
我用自制軟件安裝了libev。共享庫位於/ usr/local/lib中,我已經使用了包括「-I/usr/local/lib」,「-l libev」和「-L/usr/local/lib 」。
援助讚賞,我寧願不必靜態編譯。
我在編譯器調用中看不到「-lev」。 – 2013-04-07 23:59:21