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

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.

Leave a Comment