09-14-2021 08:07 AM
Hello everyone,
I have already seen that some questions have been asked here and there about the topic of curl library. I am trying to get acces to a cloud website and I already found the curl library that I downloaded and included in my CVI code. The problem now is that there are a lot of Header files that are not to be found and there are tons of them so it is basically impossible to download each of the missing header files for the code.
The code that I actually want to impelement in my CVI project is discussed here:
https://stackoverflow.com/questions/2329571/c-libcurl-get-output-into-a-string/2329792#2329792
Is there any way how I can find or use a library that is nearly impossible to compeletely download?
Thanks a lot in advance..
09-15-2021 03:18 AM
You should not download individual files from a project, definitely not a project like libcurl. Instead you need to download a package. There are usually two sort of packages for Open Source projects like libcurl.
- A development package contains all the header files (usually in a folder called include), the import link libraries (for both 32-bit and 64-bit compilation seperately often in directories called lib32 and lib64 but it could also just be a lib directory with the 32-bit and 64-bit designation being part of the library name) and last but not least the DLLs (also in both bitnesses). Alternatively the package may also contain static libraries instead of DLLs with according import libraries.
- A source code package contains also all the header files and in addition to that also the source code files (usually in a folder called src or source). It may or may not contain the build products (DLLs and import libraries and/or static libraries), additional documentation and unit tests, test projects and whatever else the developers deemed interesting.
For your purpose you usually want to get a development package. You then need to add the include directory and the correct library directory of that package to your CVI project, and then add the necessary #include statements to your source code files.
02-16-2022 10:09 AM
Hello! i'm doing the same job, i need to use cURL in my project, have you solved this problem?
i've tryed to do a wrapper but it gives me error in calling convention.
if i you the library without the wrapper there is no .lib but a .a library file and it's impossible to call the library.
attached my example project, with both the test.
now i'm thinking to bypass the problem calling cURL with system ("cmd.exe /c curl ... > result.json) forcing the command prompt to save the result in a file and then i will read this file.
it's not the fastest way but get the job done and with nvme ssd it's not slowing down the software so much.
02-17-2022 07:19 AM
ok, I've got it work!
the error in my wrapper is that I've declared the function as stdcall but this dll is cdecl.
just change it and it works!
09-07-2022 08:04 AM
Hi @holly7877
I saw the project you attached.
09-07-2022 08:18 AM
Hi @vix
actually I don't rember every step I've done but I can attache you this sample project that wrap the .dll and get the example.com website