Undefined reference to curl_easy_init

时间:2016-06-07 11:29:09

标签: c++ windows curl mingw-w64

System Windows 7 64bit, Eclipse Mars + CDT, MinGW 64, curl source https://curl.haxx.se/download.html的最后一个字母的字母间距 - MinGW64 SSH SSL,尝试过具有相同链接器错误的其他版本 代码:

#include <curl/curl.h>
int main(void) {
    CURL * curl;
    curl = curl_easy_init();
    if (curl) {
        curl_easy_cleanup(curl);
    }
    return 0;
}

链接器错误的问题:

Info: Internal Builder is used for build
g++ -DCURL_STATICLIB "-IC:\\Source\\curl-7.40.0-devel-mingw64\\include" "-IC:\\Source\\curl-7.40.0-devel-mingw64\\include\\curl" -O0 -g3 -Wall -c -fmessage-length=0 -o main.o "..\\main.cpp" 
g++ -static -Wl,-Map,output.map -o xmlServiceCall.exe main.o -lcurl "-LC:\\Source\\curl-7.40.0-devel-mingw64\\lib64" 
main.o: In function `main':
C:\workspace_mars_cpp\xmlServiceCall\Debug/../main.cpp:8: undefined reference to `curl_easy_init'
C:\workspace_mars_cpp\xmlServiceCall\Debug/../main.cpp:25: undefined reference to `curl_easy_cleanup'
collect2.exe: error: ld returned 1 exit status

14:14:56 Build Finished (took 848ms)

这里已经阅读了几十个类似的问题,也在其他互联网上阅读了,但是他们都建议更改链接顺序或添加无效的路径。我还能在哪里挖掘解决这个问题?

0 个答案:

没有答案