老师给的 makefile 在 ubuntu 下正常,命令是:
g++ -std=c++0x -g -O2 -Idir FileName.cc -fPIC -shared -o FileName.so
但在 mac os 下编译出错(10.10.3)
错误信息:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有说是 command line tool 的问题,我修改为:
clang++ -stdlib=libstdc++ -g -O2 -Idir FileName.cc -fPIC -shared -o FileName.so
同样的错误
有遇到过的吗?
g++ -std=c++0x -g -O2 -Idir FileName.cc -fPIC -shared -o FileName.so
但在 mac os 下编译出错(10.10.3)
错误信息:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有说是 command line tool 的问题,我修改为:
clang++ -stdlib=libstdc++ -g -O2 -Idir FileName.cc -fPIC -shared -o FileName.so
同样的错误
有遇到过的吗?