Linux Eclipse 调用共享库报错

  •  undefined reference to `dlsym'
  •  undefined reference to `dlopen'
  •  undefined reference to `dlclose'

Property页--->C/C++ Buildings--->Settings--->Tool Settings--->GCC C++ Linker--->All options中加入-ldl。

(我操作的时候All options不能写入东西,我直接在All options上面的 Command 命令,将g++  修改为 g++ -ldl)

原文地址:https://www.cnblogs.com/hedan/p/2749525.html