0

I am trying to compile the Dlib library in Eclipse, but have an error in linking. According to: http://dlib.net/compile.html I have to include the path containing the dlib folder (that's what I did) and include the source file in my project: dlib/all/source.cpp.

I keep on getting the following error: ../source.cpp:7:41: fatal error: ../base64/base64_kernel_1.cpp: No such file or directory This is a line from the source.cpp file. The directory looks like: /usr/include/dlib-18.6/dlib/base64, If I add that path in my library I get the next error: In function dlib::threads_kernel_shared_helpers::thread_starter(void*)': /usr/include/dlib-18.6/dlib/base64/../threads/threads_kernel_2.cpp:37: undefined reference topthread_detach'

Do I have to keep adding paths after each error? Why doesn't Eclipse just add all subpaths of my /usr/include/dlib-18.6/ (that's the path containing dlib and the it's the path I added)?

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
user3116431
  • 293
  • 1
  • 10

1 Answers1

0

I think it depends a bit, on how you had setup your particular toolchain, to build your main/dlib project.

Building using e.g. GCC 4.8 (and using the -std=c++11 option) might require to specify the -pthread option on linking stage, other environments might want to link against -lpthread.

Community
  • 1
  • 1
πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190