Hi! Hope you're having a good day. I'm very new to C++ programming - and programming in general - and I wanted to ask a quick question!
I am currently working on a project that uses a web API (IEX) to get stock market data. In order to get the data, I am trying to download and use libcurl in my C++ program. However, unlike python where I can just use pip to download a third-party library, I guess you have to download and build libraries for C++ yourself? I am currently running Windows 10 64 bit and I use mingw to compile my programs on the command line. So I have some questions:
1.) There are a million download options on the curl website. Should I download the binary or should I download the source code and build it?
2.) The steps I have taken so far: I downloaded the zip file under "Source Archivess" at
https://curl.haxx.se/download.html. I then unzipped it where I wanted it. Then I went to the root directory, and I used the command "mingw32-make mingw32". This compiled. I then compiled my C++ program using "g++ -Ipath/to/include -Ipath/to/lib -o program.cpp program -lcurl", but I get the error:undefined reference to `_imp__curl_easy_cleanup'. This means that the library isn't getting linked, right? There is a libcurl.dll and libcurl.a in path/to/curl/lib - am I supposed to move that to the directory with my working program? When I move the .dll file to my working directory and use -lcurldll instead of -lcurl, it compiles, but when I try to run my executable this pops up: Error from cURL: Unsupported protocol.
3.) From what i've read online, but it could be anything, the above errors are because I didn't compile curl using -ssl? So when I restart, download it again, and try to compile with the command "mingw32-make mingw32-ssl", I get the error: "Invalid path to OpenSSL package: ../../openssl-1.0.2a. Stop." Clearly the makefile couldn't find the OpenSSL. Am i supposed to download OpenSSL and move it into a specific directory? Would I have to build that too?
Clearly, I have no idea what i'm doing. But I have been going after this for 3 days straight and could use any advice yall have!
EDIT: I have literally read every scrap of information on the internet about this lol. I also found a version (im guessing its a binary download?) that has a libcurl.dll.a and a libcurl.a and a include folder, how do I use these things to link to my program if the above wasn't correct?
I apologize for such a long post and I will of course be your slave for helping me :(
-color