0

I am trying to compile something for the last day and it is not working at all. following is my g++ command:

g++ -O3 -Wall -march=native -mfpmath=sse -fopenmp  -fno-trapping-math -fsingle-precision-constant -funroll-loops -g -I../../include/  `pkg-config --cflags opencv` -Wl,--start-group  ../../lib/libmoped.a -lm  -lm `pkg-config --libs opencv` -lgomp -lGLEW -lglut -lIL -lm camera.cpp -o camera

and I am getting the following error:

/usr/bin/ld: ../../lib/libmoped.a(ProgramGPU.o): undefined reference to symbol '__expf_finite@@GLIBC_2.15'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libm.so: error adding symbols: DSO missing from command line

I tried adding -lm multiple times, in the beginning, in the end as well as several times after each of the libraries to resolve circular dependency, but still I get the same error. I tried --start-group and put everything inside as shown in the provided command, and still end up getting the same error with the error. What is wrong?

Zheyuan Li
  • 71,365
  • 17
  • 180
  • 248
krips89
  • 1,683
  • 4
  • 17
  • 32

0 Answers0