【发布时间】:2013-09-16 19:54:06
【问题描述】:
我是 automake 工具的新手。在“src/Makefile.am”中,我使用“AM_LDFLAGS = -L... -l...”。
然后,我运行“autoreconf --force --install ; ./configure ; make”
在最后一条命令中,
$ g++ -O2 -L... -l... -o target_name [some *.o files]
编译器报错“未定义的引用...”。
但是如果我复制它并将“-L...-l...”移动到最后,并独立运行它就可以了(如下)。
$ g++ -O2 -o target_name [some *.o files] -L... -l...
所以选项的顺序很重要吗?无论如何,如何平滑它?
非常感谢。
【问题讨论】: