Getting issues while adding a external library(libcurl) in c++ with vs code

30 views Asked by At

I'm new in programming. I'm working on a project where I need a external library libcurl. After building my code it shows 'builded successfully' but when I run it it shows this error:

    fatal error: curl/curl.h: No such file or directory
#include <iostream>
#include <curl/curl.h>

int main() {
    const char* smtp_server = "smtp.gmail.com";
    const int smtp_port = 587;
    ... ... ...

I have libcurl package properly in my system. I think I have configured my c_cpp_properties.json and task.json properly.

//c_cpp_properties.json
"includePath": [
                "${workspaceFolder}/**",
                "C:\\Users\\istea\\Downloads\\libcurl\\include"
//task.json
   "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe",
                "-lcurl",
                "-IC:\\Users\\istea\\Downloads\\libcurl\\include",
                "-LC:\\Users\\istea\\Downloads\\libcurl\\lib"
0

There are 0 answers