linker error “relocation R_X86_64_PC32 against undefined symbol” despite compilation with -fPIC

前端 未结 2 1210
无人及你
无人及你 2021-01-19 02:57

I\'m compiling a c++ program using the command line

g++ -c prog.cc -std=c++11 -march=native -fPIC -fopenmp

and then try to make a shared ob

2条回答
  •  悲哀的现实
    2021-01-19 03:28

    I just ran into something similar when upgrading to ubuntu 14.04. I had to add -fkeep-inline-functions to the source file that defined the 'missing' symbol. No idea if your problem is similar.

提交回复
热议问题