ALX-9000 (Linux based PAC) User Manual version 1.0.0 Page: 71
Copyright © 2024 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
4.1.2.
Compile/Execute Demo “helloworld”
User can refer to below steps to compile and execute demo “helloworld”.
1. Add script to SDK Makefile
User can refer to the SDK Makefile (LinPAC_X86_SDK/examples/lx-8k_9k/common/Makefile)
that we had added the script for demo “helloworld.c”.
2. Type “make helloworld” command to compile demo “helloworld.c”
3. Execute binary file “helloworld”
root@icpdas:/tmp/LinPAC_X86_SDK/examples/lx-8k_9k/common#
make helloworld
gcc -I. -I../../../include -c -o helloworld.o helloworld.c
gcc -I. -I../../../include -o helloworld helloworld.o ../../../lib/libPAC_x86_64.a -lm
rm -f helloworld.o
root@icpdas:/tmp/LinPAC_X86_SDK/examples/lx-8k_9k/common#
./helloworld
Hi ~ Welcome to x86 LinPAC
root@icpdas:/tmp/LinPAC_X86_SDK/examples/lx-8k_9k/common#