My Dlib installation is in multiple places, so I'm writing a script that will search multiple locations for my necessary files to compile:
int main()
{
try{
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_io.h>
}catch(...){
cout << "Location A is incorrect: " << e << endl;
}
try{
#include <dlib/dlib/image_processing/frontal_face_detector.h>
#include <dlib/dlib/image_io.h>
}catch(...){
cout << "Location B is incorrect: " << e << endl;
}
return 0;
}
But for some reason, g++
still gives me the same No such file...
error:
g++ IWillFindLib--00.cpp -o IWillFindLib--00.o
IWillFindLib--00.cpp:8:59: fatal error: dlib/image_processing/frontal_face_detector.h: No such file or directory
#include <dlib/image_processing/frontal_face_detector.h>
^
compilation terminated.
Now, I know I could just add the locations with g++ -I home/name/dlib
, but I want the finished project to run entirely hands-off with no input from the user. How can I make this work?