【发布时间】:2012-10-25 00:26:48
【问题描述】:
当我尝试编译我的应用程序时,出现两个错误:
$ g++ -static -emit-swf -o CloudClient.swf -I../boost/boost_libraries/install-dir/include -I../ffm peg-1.0/bin/include -L../boost/boost_libraries/install-dir/lib -L../ffmpeg-1.0/bin/lib timer.o audio_encoder.o audio_generator.o video_encoder.o video_generator_rainbow.o sim ple_synchronizer.o 多路复用器.o 发射器.o graph_runner.o cloud_client.o -lswscale -lavformat -lavcodec -lavutil -lboost_system -lboost_date_time -lboost_thread -pthread -lm
../ffmpeg-1.0/bin/lib/libswscale.a: error: undefined reference to 'exp'
../ffmpeg-1.0/bin/lib/libavcodec.a: error: undefined reference to 'log'
collect2: ld returned 1 exit status
如果log 和exp 是我的问题,如果我把-lm 放在任何地方,我想知道如何从字面上创建我自己的存根而不是exp 和log 并将我的库与它们链接? ....
【问题讨论】:
-
只创建具有匹配签名的空函数?
-
@JosephQuinsey:没关系。来自
man gcc:-pthread: Adds support for multithreading with the pthreads library. This option sets flags for both the preprocessor and linker.
标签: c++ c compilation linker static-linking