mimii 发表于 2021-1-11 15:34:50

测试ping遇到的几个错误


根据OKMX6X-S3用户手册中5.3编译环境搭建流程,测试ping程序时,遇到以下两个问题

1. 无法执行ping文件
2.make时遇到的错误

wjy 发表于 2021-1-11 15:39:34

您是测试的ping的QT程序吗?需要把生成的可执行文件拷贝到开发板中并chmod给权限后才能运行。

mimii 发表于 2021-1-11 15:52:46

wjy 发表于 2021-1-11 15:39
您是测试的ping的QT程序吗?需要把生成的可执行文件拷贝到开发板中并chmod给权限后才能运行。

是的 但是现在生成可执行文件时出现了错误
root@ubuntu:~/work/qt5.6/ping# make
g++ -m64 -Wl,-O1 -o ping main.o mainwindow.o moc_mainwindow.o    -L/usr/lib/x86_64-linux-gnu -lQtGui -lQtCore -lpthread
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: mainwindow.o: Relocations in generic ELF (EM: 40)
mainwindow.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** Error 1

wjy 发表于 2021-1-12 10:08:22

您按以下步骤试试:
make distclean
. /opt/fsl-imx-x11/4.1.15-2.1.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
qmake
make
页: [1]
查看完整版本: 测试ping遇到的几个错误