你好吗?。我对Geany有一个很大的问题(或者至少我不知道如何解决它),在nanopi M1中使用Debian jessie。
它的历史如下:
在函数main中,它说:
/tmp/ccwWOISx.o in function 'main'
...... undefined reference to 'boardinit'
...... undefined reference to 'pintoGPIO'
...... undefined reference to 'openHW'
...... undefined reference to 'selectHW'
...... undefined reference to 'readHW'
...... undefined reference to 'closeHW'
......
......
and about two or tree more errors of the same type "undefined reference" all
related a functions of the hardware我使用的是gcc,这些命令是在geany中预充电的,它们是:
编译:
gcc -Wall -c "%f"内部版本:
gcc -Wall -o "%f" "%e"所以我认为(如果我已经理解了我在stackoverflow中读到的其他帖子的内容),这是一个链接错误,但不知道如何解决它。
在此之后,我将Build命令修改为:
gcc -Wall -c -o "%f" "%e"bash: ./Matrix-ir_receiver: cannot execute binary file: Exec format error我不知道如何解决这个问题,请帮帮我!
发布于 2017-10-10 03:36:10
正如我所说的,这是一个链接器问题,我需要使用-lfahw和-lm选项来构建可执行文件。我认为第一个选项是针对ARM设备的,然后程序就可以完美地运行了。
https://stackoverflow.com/questions/46625113
复制相似问题