C/C++ ftplib: Undefined reference to _imp__FtpInit
I am trying to use a C/C++ FTP library (>here's the website). When I try to call the FtpInit() function I get a compilation error telling me that there is an undefined reference to _imp__FtpInit
. This is开发者_开发知识库 what I'm trying to compile:
#include "ftplib/ftplib.h"
int main()
{
FtpInit();
return 0;
}
Did you remember to set your -L
library path to the location where you installed the library, and use -lftplib
(or similar depending on the actual library file's name) to link the library?
For Visual Studio, add the .lib file to the "Additional Dependencies" setting in project properties/Linker/Input.
You may also need to set "Additional Library Directories" in Project Properties/Linker/General
精彩评论