我想使用C/C++ FTP库(>here's the website)。当我尝试调用FtpInit()函数时,出现编译错误,告诉我有一个undefined reference to _imp__FtpInit
。这就是我想要编译:C/C++ ftplib:未定义的引用_imp__FtpInit
#include "ftplib/ftplib.h"
int main()
{
FtpInit();
return 0;
}
我想使用C/C++ FTP库(>here's the website)。当我尝试调用FtpInit()函数时,出现编译错误,告诉我有一个undefined reference to _imp__FtpInit
。这就是我想要编译:C/C++ ftplib:未定义的引用_imp__FtpInit
#include "ftplib/ftplib.h"
int main()
{
FtpInit();
return 0;
}
你记得你-L
库路径设置为您安装库中的位置,并使用-lftplib
(或类似视实际库文件的名称)链接库?
对于Visual Studio,将.lib文件添加到项目属性/链接器/输入中的“其他依赖项”设置中。
您可能还需要在项目属性/链接器/常规中设置“其他库目录”