0

I'm doing C Programming on Windows 10 with Visual Studio Code IDE.

My aim is to send HTTP Request, for this I'm planning to use curl.h header file.

As Windows, does not contains curl.h file, I have downloaded this file and placed it in the same directory as where my C Program is located, and I'm able to access header file from VS Code.

When I'm trying to run the code, I'm getting an error that there is no such directory.

Can anyone please help me to understand, how can I include external headers files on Windows?

Yash
  • 57
  • 1
  • 10
  • 1
    You might need to write `#include "curl.h"` (with quotes instead of angle brackets) to tell the compiler to look in the same directory as your C file (assuming you didn't add that directory to the compiler's search path). If you continue having trouble though, we really need to see more details about your file structure, your code, how you are buildings your program, and the specific error you are getting. See [mcve]. – David Grayson Dec 11 '21 at 18:39
  • 1
    this is not how *using libraries* works. You need to download the whole library, build it, use its headers and the matching shared library to link together your program. – Marcus Müller Dec 11 '21 at 18:41
  • https://stackoverflow.com/questions/61287421/how-do-i-define-the-curl-library-with-cmake-at-vscode – Marcus Müller Dec 11 '21 at 18:42

0 Answers0