-2
#include <iostream>
#include <curl/curl.h>

int main() {
   std::cout << "Hello, World!" << std::endl;
   return 0;
}

I get error "fatal error: curl/curl.h: No such file or directory compilation terminated." I'm really not sure which curl lib to download. I'm using windows 10 and clion with minicygwin. Really not sure what to add to the CMAKE file as well. Can anyone help? Also not sure where to download the file to? just my c:/?

Thanks

  • 1
    Welcome to Stack Overflow. Please take the time to read [The Tour](http://stackoverflow.com/tour) and refer to the material from the [Help Center](http://stackoverflow.com/help/asking) what and how you can ask here. – πάντα ῥεῖ Jun 06 '17 at 03:01

1 Answers1

0

with Cygwin specifically (idk anything about minicygwin, but i'm guessing its similar to normal Cygwin), just install libcurl4, and you won't get THAT error. enter image description here but then you'll get some undefined reference to curl errors, until you start compiling with -lcurl , when you fix that too, it should compile just fine :)

hanshenrik
  • 19,904
  • 4
  • 43
  • 89
  • I apologize, I'm not using cygwin. I'm using CLION with MinGW compiler. I still can't seem to get it to work. I downloaded the curl library from the curl website. But, I'm not sure how I can get clion to know where my files are at. I'm not sure what to put on the CMAKE file. Any help would be greatly appreciated. – Alexander Lopez Jun 08 '17 at 22:04
  • tried 1 of these? http://downloads.dlang.org/other/ - merge the lib folder with your compiler's libfolder, and the include folder with the compiler's include folder (by default, i think it was C:\mingw\lib and C:\mingw\include , but i haven't used mingw in many years, since mingw 3.x series) – hanshenrik Jun 08 '17 at 22:19
  • It didn't work. what do I add to the cmake file? I followed this thread https://stackoverflow.com/questions/33856059/problems-with-lcurl-in-clion but still cant get it to work. – Alexander Lopez Jun 08 '17 at 23:45