I am trying to get libcurl to work. I am using libcurl for the first time. I installed libcurl using vcpkg.
C:\Users\infib\vcpkg>vcpkg install curl
The following packages are already installed:
curl[core,ssl,tool,winssl]:x86-windows
Starting package 1/1: curl:x86-windows
Package curl:x86-windows is already installed
Elapsed time for package curl:x86-windows: 4.298 ms
Total elapsed time: 4.956 ms
The package curl:x86-windows provides CMake targets:
find_package(CURL CONFIG REQUIRED)
target_link_libraries(main PRIVATE CURL::libcurl)
I installed opencv64 bit and I am trying to use libcurl but I am getting many errors.
error LNK2019: unresolved external symbol __imp_curl_easy_init
error LNK2019: unresolved external symbol __imp_curl_easy_setopt
error LNK2019: unresolved external symbol __imp_curl_easy_perform
error LNK2019: unresolved external symbol __imp_curl_easy_cleanup
error LNK2019: unresolved external symbol __imp_curl_easy_getinfo
1>libcurl_a.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
1>libcurl-d.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
1>libcurl.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
1>WINMM.LIB : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
1>wldap32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
1>ws2_32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
Could some one tell me how to over come this error. I included libcurl.lib that I found in vcpkg packages folder but still I am getting this error. I tried all the methods mentioned in stackover flow libcurl thread but still I am getting the errors.
Please let me know how to solve this.