我正在使用libcurl,并且在VC++ 10中得到了以下类型的链接器错误。
1>main.obj : error LNK2019: unresolved external symbol __imp__curl_easy_strerror referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl curl_httpget(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?curl_httpget@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV12@@Z)怎样才能去掉函数名前面imp前缀?我正在链接到正确的库,正确的路径等。
发布于 2011-03-02 03:34:28
只要链接到__imp__,就会出现DLL前缀。当链接到静态链接库时,它不会出现。生成的代码最有可能是针对DLL导入库进行链接的,但您使用的是静态库进行链接。
前缀是在你用__declspec(dllimport)标记导入的函数时添加的-确保你的导入在没有链接到DLL时没有使用这个前缀。
https://stackoverflow.com/questions/5159353
复制相似问题