当前位置:网站首页>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
边栏推荐
- Listiterator list iterator
- Case - random numbers without repetition (HashSet and TreeSet)
- Sub paragraph of Chapter 16
- ZABBIX proxy, sender (without agent monitoring), performance optimization
- How to Algorithm Evaluation Methods
- 语音信号分帧的理解
- JS output uincode code
- Browser screenshot method (long screenshot, node screenshot, designated area screenshot)
- std::condition_ variable::wait_ for
- 行情绘图课程大纲1-基础知识
猜你喜欢
随机推荐
Clause 47: please use traits classes to represent type information
COAP protocol libcoap API
17.6 unique_lock详解
Problems encountered in the use of PgSQL
Customer information management system - C language
Small project - household income and expenditure software (2)
Std:: Map initialization
Clause 34: lambda is preferred over std:: bind
C language learning log 11.7
C language learning log 1.22
890. Find and Replace Pattern
Violence enumeration~
Hainan University Postgraduate Entrance Examination electronic information (085400) landing experience
Flex布局自适应失效的问题
MySQL table data modification
Chapter 2 process management
Course outline of market drawing 1- basic knowledge
Time display of the 12th Blue Bridge Cup
Chapter 18 pagination: Introduction
mongo









