Answer the question
In order to leave comments, you need to log in
Error building bin with CURL?
Error when building a static binary with CURL, if you build a non-static one, then everything builds fine, what's wrong?
The command which compiled
g++ -std=c++20 -w *.cpp -lcurl -o test.exe -static
Compiler version
gcc.exe (Rev5, Built by MSYS2 project) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
undefined reference to `__imp_curl_easy_init'
undefined reference to `__imp_curl_easy_setopt'
undefined reference to `__imp_curl_easy_setopt'
undefined reference to `__imp_curl_easy_setopt'
undefined reference to `__imp_curl_easy_setopt'
undefined reference to `__imp_curl_easy_setopt'
undefined reference to `__imp_curl_easy_perform'
undefined reference to `__imp_curl_easy_cleanup'
collect2.exe: error: ld returned 1 exit status
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question