I want to use curl library with my c++ project in visual studio code and for that i successfully installed vcpkg library manager for c++ on my linux(ubuntu) system. and installed curl library with vcpkg but installed curl library i can't use include and other function in my c++ project all include file of curl library visual studio code can't detect.
Here following steps i performed to setup and install vcpkg and curl library.
- clone vcpkg repo https://github.com/Microsoft/vcpkg
- run this sh file for build package ./bootstrap-vcpkg.sh
- entered command for intergrate vcpkg with visual studio code "vcpkg integrate install"
- entered command for install curl library using vcpkg "vcpkg install curl"
this all above steps successfully performed without any error but still i can't able to recognise curl library in visual studio code with my c++ project.
I also tried with passing inlcude path of vcpkg with visual studio code task.json file in args
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-I",
"/home/kamlesh/vcpkg/installed/x64-linux/include",
"-L" ,
"/home/kamlesh/vcpkg/installed/x64-linux/lib"
//"-lcurl"
],
when i pass include and library path with -I and -L parameter in args then project detect include file of curl library but compiler through undefined reference to function error
/usr/bin/ld: /tmp/ccG9QegR.o: in function `main':
/home/kamlesh/projects/curmmail/curlmail.cpp:17: undefined reference to `curl_easy_init'
Please help me how can i solve this issue for use curl library with vscode if there is something i m doing wrong or need to do anything extra or any other way to intergrate third party curl library with vscode c++ propject?