How to build libcurl without curl on all platforms? - libcurl

I am using Conan-Center-index to build libcurl conan package, and can build libcurl without curl by using cmake(Set the Cmake option BUILD_CURL_EXE to OFF) on windows.
But on other platforms, libcurl was built by other ways, like autoconf. And I don't know how to use these to build libcurl without curl command line tools.

Related

Debugging QT5 libraries via VSCode on OSX in CMake based project

I'm trying to debug my code based on Qt5 framework through OSX, and I need to access/debug Qt's sources, but it feels like an impossible task. On Windows, I used to install Qt5 via vcpkg, but this time I have it in my work project, which already uses brew as a package manager. But installing it through brew doesn't bring the sources, and I'm pretty sure isn't the debug version as well.
I tried various ways of building and installing the sources with no luck. By the end, cmake isn't able to find the library.
Did anybody have a chance to overcome this issue?

How to install cURL into visual studio code

I've been trying to get curl into vsc, so far I've managed to install curl and use commands in command prompt, but I have no idea how to implement it into VSC?
The path if needed is C:\curl-7.84.0-win64-mingw
(On another note, I'm trying to use it for C++ development)

Libcurl OpenSSL not found

This is extremely annoying. I've been trying to solve this for weeks...
I've successfully built libcurl with OpenSSL but this piece of code keeps returning false. I guess my last choice is to find a pre-built library (DLL Release - DLL OpenSSL).
Edit:
Forgot to add that I tried all the relevant solutions I could find and none of them worked. BTW this is for VS
curl_version_info_data * vinfo = curl_version_info(CURLVERSION_NOW);
if (vinfo->features & CURL_VERSION_SSL)
MessageBoxA(0, "Yes", 0, 0);
else
MessageBoxA(0, "No", 0, 0);
Here the my step-by-step instruction how to build Curl with OpenSSL using CMake and Visual Studio (any version)
Pre-requisites:
Installed Microsoft Visual Studio
Installed CMake
Build and install OpenSSL development libraries as described here (in my case I've installed it here C:\WORK\MSVC2013.64\openssl using perl Configure --prefix=C:\WORK\MSVC2013.64\openssl ...)
Step-by-step procedure:
git clone https://github.com/bagder/curl.git
cd curl
mkdir b.msvc
cd b.msvc
cmake .. -G"Visual Studio 12 2013 Win64" -DOPENSSL_ROOT_DIR=C:\WORK\MSVC2013.64\openssl
When CMake runs, be sure that OpenSSL is found
-- Found OpenSSL: C:/WORK/MSVC2013.64/openssl/lib/ssleay32.lib;C:/WORK/MSVC2013.
64/openssl/lib/libeay32.lib (found version "1.0.2a")
When all done without error, you'll find solution file CURL.sln which can be opened in Visual Studio or just build it with command
cmake --build . --config Release
Then check, if it was built with OpenSSL enabled
C:\WORK\GitHub\curl\b.msvc\src\Release>curl.exe --version
curl 7.42.0-DEV (Windows) libcurl/7.29.1-DEV OpenSSL/1.0.2a
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: NTLM SSL
Another thing - you can provide following option to cmake
-DCMAKE_INSTALL_PREFIX= < path to where you want install curl/libcurl >
Then
cmake --build . --config Release --target INSTALL
will install curl/libcurl to provided location
Hope this helps.

Installing c++ boost using cygwin: can't find configure file

I'm trying to install Boost for c++. Since I use cygwin (on Windows 7) I follow these instructions for Unix.
I start by downloading boost_1_55_0.zip from sourceforge. The instructions tell me to run tar --bzip2 -xf /path/to/boost_1_55_0.zip but this doesn't work (probably because the downloaded file is .zip and not .tar.bz2; I can't find the latter anywhere to download), so instead I use winrar and unzip it into /usr/local.
After this the header-only libraries work fine, but I need the ones where a build is necessary.
The instructions tells me to go to the boost folder and run./configure --help, but this doesn't work; I get the message -bash: ./configure: No such file or directory. So I locate the file configure in the folder /usr/local/boost_1_55_0/tools/build/v2/engine/boehm_gc, go there and try again, and this time it works: I get the help for configure.
I then try to run ./configure --prefix=/usr/local/boost_1_55_0 --enable-cplusplus but get the error message configure: error: cannot run /bin/sh ./config.sub. I try it with only one or none of the options too but that doesn't help.
Any ideas?
I don't know what guide you're following, but to install boost I have done:
cd boost
./bootstrap.sh
./b2
./b2 install
stop
As report boost doc:
If you plan to build from the Cygwin bash shell, you're actually
running on a POSIX platform and should follow the instructions for
getting started on Unix variants. Other command shells, such as
MinGW's MSYS, are not supported—they may or may not work.

target mingw with cygwin

I've tried building the gtest 1.5 library for MinGW
Using MSys to configure and then make results in a lot of errors, most about Win32API
On their website it says mingw is not supported but in the FAQ it is specified that a user managed to build it for mingw from cygwin configuring like this:
./configure CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin"
This configure fails for me when running a sanity check for the C++ preprocessor ... something about "/lib/cpp".
I've tried a cygwin install with only mingw-gcc4 (4.3.4) and a cygwin install with mingw-gcc4 (4.3.4) and cygwin's own gcc (~3.4.4).
Generally, the library could be smoothly configured and built with cygwin gcc (3.4.4) using the flags you have specified above. You should only validate that gcc-mingw, gcc-mingw-core & gcc-mingw-g++ packages are installed in cygwin. There is no need in mingw-gcc4