Sir,
- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2")
-- Configuring done
-- Generating done
-- Build files have been written to: /root/TEST_07/example/luckfox_retinaface_facenet/cpp_spi/build
root/TEST_07/example/luckfox_retinaface_facenet/cpp_spi/src/main.cc:39:10: fatal error: openssl/ssl.h: No such file or directory
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
HTTP GET from Luckfox pico
Respected sir can we perform http get post in luckfox pico pro max
In the Luckfox Pico, the OpenSSL version used on the device is different from the one used in the build environment. You can directly obtain the OpenSSL libraries and header files from Buildroot and add the following to your CMakeLists.txt:
Code: Select all
# Set the Buildroot path
set(BUILDROOT_PATH "<Your Luckfox Pico SDK Path>/sysdrv/source/buildroot/buildroot-2023.02.6/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot")
# Set the CMake prefix path
set(CMAKE_PREFIX_PATH "${BUILDROOT_PATH}/usr")
# Include directories and library paths
include_directories("${BUILDROOT_PATH}/usr/include")
link_directories("${BUILDROOT_PATH}/usr/lib")
set(CMAKE_BUILD_RPATH "${BUILDROOT_PATH}/usr/lib")
set(CMAKE_INSTALL_RPATH "${BUILDROOT_PATH}/usr/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# Find OpenSSL libraries
find_library(SSL_LIB NAMES ssl PATHS ${BUILDROOT_PATH}/usr/lib)
find_library(CRYPTO_LIB NAMES crypto PATHS ${BUILDROOT_PATH}/usr/lib)
# Link libraries to your target
target_link_libraries(<Your Target> ${OpenCV_LIBS} ${PISTACHE_LIB} ${SSL_LIB} ${CRYPTO_LIB})