a2flo / floor_examples

example programs for https://github.com/a2flo/floor (dnn, nbody, warp, hlbvh, path tracer, other)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nbody clang error

Janphr opened this issue · comments

Hey,

I'm trying to build your nbody example, but get this error in the linking step:

>> linking ... /usr/bin/clang++ -o bin/nbody build/release/src/gl_renderer.cpp.o build/release/src/main.cpp.o build/release/src/vulkan_renderer.cpp.o build/release/src/nbody.cpp.o build/release/src/unified_renderer.cpp.o build/release/src/metal_renderer.mm.o -fvisibility=default -stdlib=libc++ -m64 -lfloor -rdynamic -rpath /opt/floor/lib -fPIC -L/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,--enable-new-dtags -lSDL2 -lcrypto -lssl -lopenal -lpthread -lGL -lXxf86vm -lc++abi -L/usr/lib -L/usr/local/lib -L/opt/floor/lib build/release/src/metal_renderer.mm.o:(.data.DW.ref.__gnu_objc_personality_v0[DW.ref.__gnu_objc_personality_v0]+0x0): undefined reference to __gnu_objc_personality_v0'
clang: error: linker command failed with exit code 1 (use -v to see invocation)`

Any idea what I might have missed?

Hi, thanks for reporting. There seems to be an issue with linking Objective-C++ in the latest clang/libc++/ld/gcc-libs.
I've worked around this for now (metal_renderer isn't needed anyways on Linux), so this should work now:
a16c128