libcurl on windows - c++

I am writing a C++ application that needs to use libcurl with HTTPS support. I already built the basic libcurl without any problem. However I have spent over 10 hours on compiling the HTTPS version, I've tried building it with VS2008, I've tried with mingw32 and I've tried with nmake. I have read about every post there is on the subject and nothing seems to work on my computer.
My question is the following : Since I use the curl lib without modifications, Is there anywhere I can find a package containing : libcurl.lib, libcurl.dll, and all the necessary dlls (ssl,zlib, libeay32,etc) to include them in my project and never worry about compilation ever again??
The lib absolutely needs to have SSL support.
Thanks
David

Related

Poco FindMySql.cmake not able to find MySQL source

I'm working with a bit of a legacy cpp code base. This code base is reliant on Poco, more specifically Poco/MySQL.
When loading Poco via Cmake, it attempts to find the MySQL include and libs. I have the source code of MySQL in a folder nearby, and am attempting to link it in the CMake. While I was able to get the include directory linked correctly, it's still not finding mysqlclient(_r) and I have no idea why. I'm currently attempting in on Mac, but I'd like to make it cross platform as well.
FindMySQL.cmake:
find_library(MYSQL_LIB NAMES mysqlclient_r
PATHS
/usr/lib/mysql
/usr/local/lib/mysql
/usr/local/mysql/lib
/usr/local/mysql/lib/mysql
/opt/mysql/mysql/lib
/opt/mysql/mysql/lib/mysql
$ENV{MYSQL_DIR}/libmysql_r/.libs
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/lib/mysql
${CMAKE_CURRENT_SOURCE_DIR}/../../mysql/lib
${CMAKE_CURRENT_SOURCE_DIR}/../../mysql/libmysql)
message("${MYSQL_LIB}") # MYSQL_LIB-NOTFOUND
https://github.com/mysql/mysql-server
That's the MySQL source I'm attempting to build.
After a very long time I found the answer.
Changing it to include_library instead worked fine as it was an include only library.

Issues using POCO with OpenSSL to send SMTP email

This is my first time writing a program that has any interaction with email. As such, I simply want a program that when ran, sends an email. After some googling I have found that POCO is a simple library that allows me to do just that.
I would prefer to use C++.
I downloaded the latest version of POCO and included the library as well as the include folders in VS2015 Community on Windows 10. I set up a program just like the one found at this tutorial: https://axistasoft.com/blog/poco/poco-net/item/sending-email-messages-using-poco-securestreamsocket-securesmtpclientsession-class
However, when I compile the program I receive the error:
1>d:\downloads\openssl-1.1.0c\openssl-1.1.0c\include\openssl\e_os2.h(13): fatal error C1083: Cannot open include file: 'openssl/opensslconf.h': No such file or directory
So when I navigate to the folder that is named, I find a filed named 'opensslconf.h.in' - close to the file it is looking for. I'm not really sure what else to do here. This is my first time using POCO. I tried to use a simpler version with no OpenSSL but I do not believe it is possible to send email through GMail without it.
I have researched the errors but they either say that I just need to remove OpenSSL (can't do that) or some things specific to Unix, which I'm on windows.
Any ideas?
You can add it as an include folder, like -I D:\Path\To\Include\OpenSSL as a compiler argument or add it in your VS project in project settings.

Using Lapack Fortran in eclipse C++ project?

I've recently inherited a code that makes quite a lot of calls to Lapack functions, with this syntax :
F77_NAME(dgemm)(&trans,&trans,&n,&n,&n,&alpha,&D[0][0],&n,&P[0][0],&n,&beta,&temp[0][0],&n);
With the following includes :
#include <blas.h>
#include <lapacke.h>
On windows, and with eclipse CDT, the compilation works fine. I've installed Lapacke with an executable and I have had absolutely no problems with this library.
On Linux (and still with eclipse CDT), however, it's been difficult to say the least. I managed to make the include works, but I can't seem to do it for . I've managed to include but the syntax is then wrong and that would be quite long to change it all.
Do you have an idea how I could resolve this ? I've tried various thing, like linking an absolute path, but I can't find blas.h anywhere on my system despite all the libraries I installed through synaptic. Maybe I didn't install the right ones ?
Additionally, I've had some issues with github with this project. To make things short, I started developping on Windows, created the git project from there and went on. When I switched to Linux for testing purpose, I for some reason kept the windows configuration (So C:/Program Files includes, building a .exe ...), I guess I didn't set up the git properly (wouldn't be the first time) but I have no idea how to fix this ... I currently have two different git : one with the Windows configuration and the other with the Linux one .. Not ideal since we're two working on the project.
Thanks for your help !

libcurl/curlpp giving me "__imp__curl_version" error

I'm trying to make an application in C++, in Windows using VS 2015. I've read in many places that curlpp is a good way to make HTTP requests. So I downloaded curlpp and noticed that it needed libcurl.
I've built curlpp normally, and I've also managed to build libcurl using the instructions inside winbuild/BUILD.WINDOWS.txt and it generated a libcurl_a.lib. I've also added everything to the include paths, preprocessor, additional dependencies, whatnot.
However, when I try to compile my project, here's what I get:
1>curlpp.lib(cURLpp.obj) : error LNK2001: unresolved external symbol __imp__curl_version
I'm not sure how to fix this. I've searched the entire libcurl and curlpp trying to find what __imp__curl_version is with no luck. I've also spent a lot of time trying to figure it out, but everywhere I look, people just say that libcurl needs to be linked, but I'm already doing that. What is wrong?
If you need any more information, I'll update the post.
Thanks!
EDIT: As #frymode suggested, I used another sln file and compiled using another configuration. That solved my problem.

C++: How do you run an executable in windows that uses libcurl?

I wrote a utility to grab information off the web using libcurl and written and compiled using Cygwin on a Windows 7 machine. I'd like to be able to run the executable in the windows environment, but when I do I get the error "The program can't start because cygcurl-4.dll is missing from your computer." I'm not sure how to resolve this, because even if I install libcurl for windows it seems like it's looking specifically for the Cygwin version. Ideally I'd like to figure out how to make the program self contained so it can function without people having to install any libraries themselves.
"The program can't start because cygcurl-4.dll is missing from your computer."
You only need to distribute cygcurl-4.dll with your executable to solve this (put the dll into the same folder).
It should be located in the binaries folder of Cygwin.
In order to make your program self-contained, you should try to compile libcurl on Windows as a static library (a .lib file) without cygwin. Some people say that it is doable. If you're unlucky, maybe you should try some other similar library.