g++ compile error: undefined reference to a shared library function which exists

前端 未结 3 975
广开言路
广开言路 2021-02-19 05:15

I recently installed the hdf5 library on an ubuntu machine, and am now having trouble linking to the exported functions. I wrote a simple test script re

3条回答
  •  面向向阳花
    2021-02-19 06:06

    This is not a bug. See C++ shared library undefined reference to `FooClass::SayHello()'

    "Recent versions of GCC reuqire that you put the object files and libraries in the order that they depend on each other ..."

提交回复
热议问题