I'm trying to cross-compile libjpeg for RPi Pico, I'm using arm-none-eabi-gcc for this purpose. This is the command that I used to compile it:
cmake -DCMAKE_TOOLCHAIN_FILE=C:/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake -DCMAKE_C_COMPILER=arm-none-eabi-gcc -DCMAKE_CXX_COMPILER=arm-none-eabi-g++ ..
But it generated the following output:
-- The C compiler identification is MSVC 19.40.33811.0
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please post that file on discourse.cmake.org.
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_BUILD_TYPE = Release
-- VERSION = 3.0.4, BUILD = 20240913
-- 64-bit build (cortex-m0plus)
-- CMAKE_INSTALL_PREFIX = /opt/libjpeg-turbo
-- CMAKE_INSTALL_BINDIR = bin (/opt/libjpeg-turbo/bin)
-- CMAKE_INSTALL_DATAROOTDIR = (/opt/libjpeg-turbo)
-- CMAKE_INSTALL_DOCDIR = doc (/opt/libjpeg-turbo/doc)
-- CMAKE_INSTALL_INCLUDEDIR = include (/opt/libjpeg-turbo/include)
-- CMAKE_INSTALL_LIBDIR = lib (/opt/libjpeg-turbo/lib)
-- Shared libraries enabled (ENABLE_SHARED = 1)
-- Static libraries enabled (ENABLE_STATIC = 1)
-- Arithmetic decoding support enabled (WITH_ARITH_DEC = 1)
-- Arithmetic encoding support enabled (WITH_ARITH_ENC = 1)
-- TurboJPEG API library enabled (WITH_TURBOJPEG = 1)
-- TurboJPEG Java wrapper disabled (WITH_JAVA = 0)
-- Emulating libjpeg API/ABI v6.2 (WITH_JPEG7 = 0, WITH_JPEG8 = 0)
-- libjpeg API shared library version = 62.4.0
-- Compiler flags = -mcpu=cortex-m0plus -mthumb
-- Linker flags =
-- Looking for sys/types.h
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Looking for sys/types.h - found
-- Looking for stdint.h
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Looking for stdint.h - found
-- Looking for stddef.h
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Looking for stddef.h - found
-- Check size of size_t
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Check size of size_t - done
-- Check size of unsigned long
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Check size of unsigned long - done
-- Performing Test HIDDEN_WORKS
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Performing Test HIDDEN_WORKS - Failed
-- Performing Test INLINE_WORKS
System is unknown to cmake, create:
Platform/PICO to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Performing Test INLINE_WORKS - Failed
CMake Error at CMakeLists.txt:525 (message):
Could not determine how to inline functions.
-- Configuring incomplete, errors occurred!
I'm rather new to cross-compilation and libjpeg, what am I doing wrong here? My OS is Windows 10.