linking with clang++ on OS X generates lots of symbol not found errors

纵然是瞬间 提交于 2019-11-27 01:25:21

I suspect this issue is because of the two C++ runtime libraries available under OS X. Use the following to link the dynamic library:

clang++ -stdlib=libc++ -o Analysis.dylib -shared DataFile.o CR39DataFile.o

(the -stdlib=libc++ being the key difference). I think the default C++ runtime is the GNU implementation which is confusing the linker as you compiled with the libc++ implementation.

As a side note, faced with the same error message, I discovered I needed to use gcc -lstdc++ -lLibraryName ... (the stdc++ part being needed).

See also https://github.com/JonathanSalwan/Triton/issues/243

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!