Skip to content

CrossCompiling #163

@adrenalingod

Description

@adrenalingod

Hay,

the program works and everything is fine but my next goal is to crosscompile it for aarch64.
I am using:

OS:
Description: Ubuntu 24.04.2 LTS
Codename: noble

IDE:
Eclipse for C/C++ developers

Cross Compiler:
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

I tried some things:
1.changed the main CMakeLists.txt
#SET(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
#SET(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)

-> rm -rf CMakeCache.txt CMakeFiles/

cmake is stuck in a loop and tells that the file has been changed.

  1. Changed my main compiler
    export CC=/usr/bin/aarch64-linux-gnu-gcc
    export CXX=/usr/bin/aarch64-linux-gnu-g++

-> rm -rf CMakeCache.txt CMakeFiles/

cmake output:

-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:21 (find_package):
By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SDL2", but
CMake did not find one.

Could not find a package configuration file provided by "SDL2" with any of
the following names:

SDL2Config.cmake
sdl2-config.cmake

Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
"SDL2_DIR" to a directory containing one of the above files. If "SDL2"
provides a separate development package or SDK, be sure it has been
installed.

It is my first time crosscompiling a bigger project.
What are the steps necessary to get it up and running?
I guess that all the used libraries are not working with an aarch compiler.
Do I have to somehow redownload every single library used and set up a second project specially for the the aarch display
Do I even need SDL for the Display? I read that is more for newer graphic cards.

Thanks for your input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions