I am compiling code that uses the external library https://www.cs.cmu.edu/afs/cs/project/quake/public/www/triangle.html
.
All the triangle source and object files are in ~/triangle/ folder. So I compile like this:
g++ -g sobel_aot_run.cpp sobel_x_out.a sobel_y_out.a support.a -ljpeg -lpng -std=c++11 -I ../include -I ../tools -I ~/triangle -lpthread -ldl -o sobel
Even though I have specified -I ~/triangle
, running this command gives the following error:
/tmp/cc9AUEre.o: In function `main':
/home/zendevil/Halide/tutorial/sobel_aot_run.cpp:74: undefined reference to `triangulate(char*, triangulateio*, triangulateio*, triangulateio*)'
collect2: error: ld returned 1 exit status
How to compile this?