0

I took my cpp app that was working on VS in windows env and tried to compile it in linux using eclipse. i followed the steps described in https://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation

and i keep getting the following error message:

17:16:29 **** Incremental Build of configuration Debug for project deskLinux **** make all Building target: libdeskLinux Invoking: GCC C++ Linker g++ -L/usr/local/lib -L"/home/ben/work/DeskLinux/deskLinux:/" -shared -o "libdeskLinux" ./src/deskLinux.o -lopencv_core -lopencv_imgcodecs -lgflag -lglog -lceres -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann /usr/bin/ld: ./src/deskLinux.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC ./src/deskLinux.o: error adding symbols: Bad value makefile:45: recipe for target 'libdeskLinux' failed collect2: error: ld returned 1 exit status make: *** [libdeskLinux] Error 1

17:16:29 Build Finished (took 112ms)

any ideas?

user1322801
  • 839
  • 1
  • 12
  • 27

0 Answers0