How do I solve these libcurl linking errors?

后端 未结 4 1074
借酒劲吻你
借酒劲吻你 2020-12-17 22:21
[Administrator@windows ~]$ g++ client.cpp -lcurl -o client.exe
C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\ccKXFUtC.o:client.cpp:(.text+0x23): undefined reference to `_i         


        
4条回答
  •  情歌与酒
    2020-12-17 22:47

    I was able to avoid these curl linking errors on windows (mingw win32) by adding option -lcurl.dll. -DCURL_STATICLIB was not needed in my case.

    My build has two libcurl files in mingw/lib folder: libcurl.a and libcurl.dll.a

提交回复
热议问题