运行错误:
libtest.so: undefined reference to `GetXXX'
collect2: error: ld returned 1 exit status
Makefile:273: recipe for target 'XXX_example' failed
make: *** [XXX_example] Error 1
问题查找:
arm-linux-gnueabihf-readelf -a ~/xxx/libtest.so |grep GetXXX
0x1e88 <GetXXX>: @0xdd30
183: 00001e88 1276 FUNC LOCAL DEFAULT 11 GetXXX
解决:
接口定位为外部可访问接口:
arm-linux-gnueabihf-readelf -a ~/xxx/libtest.so |grep GetXXX
0x1e88 <GetXXX>: @0xdd30
183: 00001e88 1276 FUNC GLOBAL DEFAULT 11 GetXXX
C/C++公共接口调用未定义引用问题解决

被折叠的 条评论
为什么被折叠?



