Can';t链接共享库
我想为另一个共享库制作包装器 elsymobileclient.hCan';t链接共享库,c,shared-libraries,C,Shared Libraries,我想为另一个共享库制作包装器 elsymobileclient.h extern void* CreateClass(void); elsymobileclientwrapper.c #include <AnswStruct.h> #include <elsymobileclient.h> void * W_CreateClass() { return CreateClass(); } /tmp/ccDxlXsd.o:在函数W_CreateClass'中: el
extern void* CreateClass(void);
elsymobileclientwrapper.c
#include <AnswStruct.h>
#include <elsymobileclient.h>
void * W_CreateClass() {
return CreateClass();
}
/tmp/ccDxlXsd.o:在函数W_CreateClass'中:
elsymobileclientwrapper.c:(.text+0x7):对
CreateClass'的未定义引用
collect2:ld返回了1个退出状态
哪里错了?库中是否实际定义了
CreateClass
?你能演示一下吗?你确定libelsymobileclient.so
定义了CreateClass
?你检查过<代码> NM>代码> $NML-G LyBelySypCycLeunt.W.JavaWiReistPoSt类uüunWrrEngRead @ @ Gcc3.3.0 00004970 T Z11CeATECRASSV 00004960 T Z11DELTECELASSPASVS领先的代码> Z11?/Cord>在名称中表示这是一个C++函数,因此不能被C程序使用。在C++中使用C++函数试试
$ gcc -I. -L. elsymobileclientwrapper.c -lelsymobileclient