0 votes

I'm writing custom module for my project as I want to use some external libraries, but I have trouble with SCsub and I can't have much documentation on how to use it.

I managed to add OpenCV by adding env.Append(LIBS=["opencv_core"]) to my SCsub, but when I try the same with dlib I get an error: /usr/local/include/dlib/test_for_odr_violations.h:24: undefined reference to `USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1_' /usr/local/include/dlib/test_for_odr_violations.h:51: undefined reference to `DLIB_VERSION_MISMATCH_CHECK__EXPECTED_VERSION_19_16_0'

it seems that if I were using CMake, I'd have to add target_link_libraries(my_target dlib::dlib) but how to handle it in SCsub?

asked Jun 5, 2019 in Projects by HalfTough (109 points)

1 Answer

0 votes

Solved it. Turns out dlib doesn't like being anywhere but where all system libraries are. So instead of having my .a file with the project I simply installed dlib-dev and pointed out to system location

module_env.Append(CPPPATH = ['/usr/include'])
module_env.Append(LIBPATH = ['/usr/lib'])
module_env.Append(LIBS=["dlib"])
answered Jul 14, 2019 by HalfTough (109 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.