Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t链接共享库_C_Shared Libraries - Fatal编程技术网

Can';t链接共享库

Can';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

我想为另一个共享库制作包装器

elsymobileclient.h

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