Linking libcurl while cross compiling with mingw32 under Linux for Windows

前端 未结 1 1451
無奈伤痛
無奈伤痛 2021-01-13 07:07

I have compiled libcurl using mingw32 and am trying to link it with my program using mingw32 for a Windows system from my Linux machine.

I was outputted the files, l

相关标签:
1条回答
  • 2021-01-13 07:37

    I was able to solve the question by specifying -DCURL_STATICLIB, as well as linking some other dependencies.

    x86_64-w64-mingw32-g++ main.cpp -o hello.exe -DCURL_STATICLIB -static -lstdc++ -lgcc -lpthread -lcurl -lwldap32 -lws2_32
    
    0 讨论(0)
提交回复
热议问题