Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | 1234ab |
I’m following the tutorial on GitHub - godotengine/godot-cpp: C++ bindings for the Godot script API but when I get to the part to compile the code (init.cpp, which I copy-pasted) the first clang++ runs fine.
But when I run clang++ -o bin/libtest.so -shared src/init.o -Lgodot-cpp/bin -llibgodot-cpp.linux.debug.64.a
I get the following error:
/usr/bin/ld: cannot find -llibgodot-cpp.linux.debug.64.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and when I run it with -v:
...
"/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -shared -o build/libtest.so /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -Lsource/godot-cpp/bin -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../.. -L/usr/lib/llvm-10/bin/../lib -L/lib -L/usr/lib build/init.o -llibgodot-cpp.linux.debug.64.a -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
/usr/bin/ld: cannot find -llibgodot-cpp.linux.debug.64.a
But I compiled the godot-c++ thing with scons, and I have the library in godot-cpp/bin with the name libgodot-cpp.linux.debug.64.a . I hope I didn’t miss something obvious but I have no idea what’s causing this. I tried specifying with absolute path, I replaced my custom paths with the one from the tutorial, but it still doesn’t find it. I also tried putting spaces.
OS: ubuntu 20.04
clang version 10.0.0-4ubuntu1