我有一個程序叫neuromz
,我編譯使用如何包括Makefile.am -lm或configure.ac
gcc neuromz.c -lm -o neuromz
它的做工精細,但如果我嘗試添加到我的項目configure.ac
和Makefile.am
與Makefile.am
:
bin_PROGRAMS = neuromz
neuromz_SOURCES = neuromz.c neuromz.h ann.c ann.h
neuromz_CFLAGS = -lm
結果是:
/home/mz/programming/ctest/ANN/ann.c:11: undefined reference to `exp'
/home/mz/programming/ctest/ANN/ann.c:11: undefined reference to `exp'
我該如何解決?