Closed wanggao1990 closed 4 years ago
me too,how to fix?
me too,how to fix?
This Pi arach64 Image just contain a runtime gcc/g++ complier. The same error occurs when jusy run gcc main.c -o main
to printf “hello world.”
Just cross complie source code on other platform and excute the binary file on PI system.
Or if u have any other better solution, tell me pls.
@wanggao1990 @xiadeye U're not right, 1'st pls understand sid-used command from our readme. The system had not include libc-dev pkg by default, run command :
sid-used apt install libc6-dev-arm64-cross
root@raspbian:~# dpkg -L libc6-dev-arm64-cross| grep -E "crtn|crti|Scrt1"
/usr/aarch64-linux-gnu/lib/Scrt1.o
/usr/aarch64-linux-gnu/lib/crti.o
/usr/aarch64-linux-gnu/lib/crtn.o
root@raspbian:~# cat test.c
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
return 0;
}
root@raspbian:~# gcc test.c
root@raspbian:~# ./a.out
Hello world!
The everything will be OK.
So, read readme file 1'st pls!!
-- The C compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler
is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)