当前位置: 技术问答>linux和unix
编译miniGUI程序出错,cannot find -lminigui
来源: 互联网 发布时间:2016-12-23
本文导语: 编译hello.c出错,如下: [root@localhost test]# arm-elf-gcc -elf2flt -fno-pic -fno-PIC -o hello hello.c -lminigui -lpthread -lm -L /usr/local/arm-linux/arm-linux/lib -I /usr/local/arm-linux/arm-linux/include hello.c: In function `MiniGUIAppMain': hello.c:54: ...
编译hello.c出错,如下:
[root@localhost test]# arm-elf-gcc -elf2flt -fno-pic -fno-PIC -o hello hello.c -lminigui -lpthread -lm -L /usr/local/arm-linux/arm-linux/lib -I /usr/local/arm-linux/arm-linux/include
hello.c: In function `MiniGUIAppMain':
hello.c:54: warning: assignment makes integer from pointer without a cast
/usr/local/arm-elf/bin/ld.real: cannot find -lminigui
collect2: ld returned 1 exit status
我的libminigui成功安装在/usr/local/arm-linux/arm-linux下。
[root@localhost test]# arm-elf-gcc -elf2flt -fno-pic -fno-PIC -o hello hello.c -lminigui -lpthread -lm -L /usr/local/arm-linux/arm-linux/lib -I /usr/local/arm-linux/arm-linux/include
hello.c: In function `MiniGUIAppMain':
hello.c:54: warning: assignment makes integer from pointer without a cast
/usr/local/arm-elf/bin/ld.real: cannot find -lminigui
collect2: ld returned 1 exit status
我的libminigui成功安装在/usr/local/arm-linux/arm-linux下。
|
帮顶
|
-L/usr/local/arm-linux/arm-linux/lib -I/usr/local/arm-linux/arm-linux/include -I内核头文件路径
-L -I 都是直接跟路径即可