当前位置:网站首页>Compilation croisée helloworld avec cmake
Compilation croisée helloworld avec cmake
2022-06-13 05:24:00 【M. Bluetooth.】
Environnement hôte
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
cmakeVersion
cmake --version
cmake version 3.16.3
helloworld.c
[email protected]:/mnt/lab/cmake_helloworld$ cat helloworld.c
#include <stdio.h>int main(int argc, char *argv[])
{
printf("hello world\n");
return 0;
}
CMakeLists.txt
[email protected]:/mnt/lab/cmake_helloworld$ cat CMakeLists.txt
project(helloworld_project)cmake_minimum_required(VERSION 3.16)
set (CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set (CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)add_executable(helloworld helloworld.c)
Mise en œuvrecmakeGénération de commandesMakefile
[email protected]:/mnt/lab/cmake_helloworld$ cmake .
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/lab/cmake_helloworld
Mise en œuvremakeLes ordres
[email protected]:/mnt/lab/cmake_helloworld$ make
Scanning dependencies of target helloworld
[ 50%] Building C object CMakeFiles/helloworld.dir/helloworld.c.o
[100%] Linking C executable helloworld
[100%] Built target helloworld
Voir leshelloworldFormat
[email protected]:/mnt/lab/cmake_helloworld$ file helloworld
helloworld: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=64931729ed98ba097ffafab33a540e307404aaf9, for GNU/Linux 3.7.0, not stripped
Compilation croisée réussie
边栏推荐
猜你喜欢

Chapter 13 abstraction: address space

Case - simulated landlords (primary version)

metaRTC4.0集成ffmpeg编译

890. Find and Replace Pattern

Chapter 15 mechanism: Address Translation

C language learning log 12.5

RTSP streaming using easydarwin+ffmpeg

BM1Z002FJ-EVK-001开机测评

Pycharm错误解决:Process finished with exit code -1073741819 (0xC0000005)

C calls the API and parses the returned JSON string
随机推荐
Introduction to R language 4--- R language process control
【多线程】线程池核心类-ThreadPoolExecutor
Jeffery0207 blog navigation
Pyqt5 controls qpixmap, qlineedit qsplitter, qcombobox
Django uses redis to store sessions starting from 0
Clause 47: please use traits classes to represent type information
C language learning log 10.6
Redis plus instructions
关于匿名内部类
Django uploads local binaries to the database filefield field
Standard input dialog for pyqt5 qinputdialog
行情绘图课程大纲1-基础知识
1.2 differences caused by keywords
[multithreading] thread pool core class -threadpoolexecutor
KVM hot migration for KVM virtual management
Case -- the HashSet set stores the student object and traverses
Use of mongodb
Sub paragraph of Chapter 16
Metartc4.0 integrated ffmpeg compilation
Bicolor case