Libcurl OpenSSL not found - c++

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.

Related

Error building BGFX on windows for mingw-gcc

I am trying to build bgfx on windows 64-bit with mingw-gcc and not Visual Studio. While trying to build I got errors
I tried to build the bgfx library with make mingw-gcc-debug64 and I got errors while running the command. I got the following output: command line error My gcc is installed at C:\llvm-mingw\bin\gcc.exe. Please let me know how I can fix this. Thanks!
Try this way (note if your OS Linux you dont need install MSYS2- this is for Windows only)
install git, cmake.
Install mingw64 via "MSYS2" devtools manager. this is manual how to do it https://www.devdungeon.com/content/install-gcc-compiler-windows-msys2-cc , install MSYS2 with all dev tools (gcc toollchanain, cmake, make, mc.. )
clone to your folder on your pc cmake-version of bgfx via command "git clone --recursive https://github.com/bkaradzic/bgfx.cmake.git"
make build folder inside bgfx.cmake
from the build folder in command terminal type cmake "-G "MinGW Makefiles" .." (if your system is Linux just type "cmake .." )
"type cmake --build . --target examples" after type "cmake --build . --target tools"
That is all!

How to Install ONOS using Bazel in Ubuntu 20.04?

I have been trying to install ONOS using Bazel's new version i.e., Bazel-5.1.1 in Ubuntu 20.04 LTS for mininet/containernet. I have been having issues regarding Bazel build onos command. I have searched for the installation process all over and tried as well many. But have similar issues. Is there any link or article where there is a clear step-by-step procedure to do so? I am having a task for the installation which I need to finish in a week. Any help would be appreciated. Thanks in Advance.
The error I get:
sendate#sendate04:~/onos$ bazel build onos
ERROR: The project you're trying to build requires Bazel 3.7.2 (specified in /home/sendate/onos/.bazelversion), but it wasn't found in /home/sendate/.bazel/bin.
Bazel binaries for all official releases can be downloaded from here:
https://github.com/bazelbuild/bazel/releases
You can download the required version directly using this command:
(cd "/home/sendate/.bazel/bin" && curl -fLO https://releases.bazel.build/3.7.2/release/bazel-3.7.2-linux-x86_64 && chmod +x bazel-3.7.2-linux-x86_64)
I tried doing the steps given like downloading the same version and also tried to change the version in the .bazelversion file. But nothing succeeded in Bazel build.
1.bazel —-version
If you didn’t download bazel version 3.7.x download it. If you download java version 11.You need create java default symbolic link. It will be /bar/lib/jam. . Test echo $PATH it will give ONON path. Then run sudo apt install —-reinstall build-essential. Build onos

how to install nasm on mingw for build openh264 library for windows application using pjsip library

I am struggling with build openh264 library in mingw . showing some error like nasm not INSTALLED ERROR found ..How to resolve the issues..
actually i want to add video settings in pjsip library for running call applications..
I have put command in mingw like >>make install .
Anyone know the issues or correct command to build the library.
Any help.thanks in advance...
https://trac.pjsip.org/repos/wiki/Getting-Started/Windows#BuildPreparationforWindows
https://trac.pjsip.org/repos/ticket/1947
I ran into this issue as well, and I had to install NASM on MinGW. The latest version of NASM wouldn't install for me, so I used this version:
https://www.nasm.us/pub/nasm/releasebuilds/2.12.03rc1/
I copied nasm-2.12.03rc1.zip and unzipped it to /MinGW/msys/1.0/nasm-2.12.03rc1/ from Windows Explorer, then I installed it using the steps here:
https://github.com/letolabs/nasm/blob/master/INSTALL
Within the MinGW shell, I then ran "cd /openh264-master/" and "make" to install OpenH264.
Hope this helps!

Visual Studio Compile Source

I would like to compile the source:
https://github.com/Benjamin-Dobell/Heimdall
I'm have downloaded the source launch visual studio and open heimdall/main.cpp
However when trying F5 nothing happening.
Please help
Have a look at the Readmes (e.g. Win32):
Appendix B - Installing Heimdall Suite from Source
Heimdall and Heimdall Frontend both utilise CMake for managing the build
process. CMake can generate files for various build systems including GNU
Make and Visual Studio. However, official packages are compiled with GNU
Make and MinGW-W64 GCC/G++.
NOTE: Official builds use MinGW-W64 simply because on-going cross-platform
development is simpler when using just the one IDE (Jetbrain's CLion)
and similar toolchains.
1. Setup a MinGW-W64 build environment by utilising MSYS2:
http://msys2.github.io/
2. After installing MSYS2 a command prompt will launch, enter:
Pacman -Syu
Pacman -S mingw-w64-x86_64 mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-libusb mingw-w64-x86_64-qt5-static make
3. Add the MinGW-W64 binaries to your PATH environment variable:
export PATH="/mingw64/bin:$PATH"
4. Build Heimdall & Heimdall Frontend
mkdir build
cd build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/c/msys64/mingw64/qt5-static/lib/cmake/Qt5Widgets ..
make
You can checkout v1.4.0 tag, open msvc2012.sln and build that code instead.
You will need Qt Developer Framework (4.7 or later, but prior to 5.0) to build it

CMake cannot find libcurl-config.cmake

I'm trying to compile code with cmake. The code was imported from Windows onto a Raspberry Pi with Debian OS. The code works fine when compiling on Windows. Here is the error when I try to compile:
CMake Error at CMakeLists.txt:6 (FIND_PACKAGE):
By not providing "Findlibcurl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "libcurl", but
CMake did not find one.
Could not find a package configuration file provided by "libcurl" with any
of the following names:
libcurlConfig.cmake
libcurl-config.cmake
Add the installation prefix of "libcurl" to CMAKE_PREFIX_PATH or set
"libcurl_DIR" to a directory containing one of the above files. If
"libcurl" provides a separate development package or SDK, be sure it has
been installed.
Here is a list of the installed packages regarding libcurl:
ii libcurl3:armhf 7.26.0-1+whe armhf easy-to-use client-side URL trans
ii libcurl3-gnutl 7.26.0-1+whe armhf easy-to-use client-side URL trans
ii libcurl4-opens 7.26.0-1+whe armhf development files and documentati
Could this mean the packages are installed incorrectly or I have the wrong one?
I did not touched arduino yet, but if you can access arduino's debian - try to do something like:
sudo apt-get install libcurl-dev --reinstall
and then:
make clean
make
P.S. You may have libcurl but CMake requires dev-information of it too.