尝试编译一个非常简单的程序,用于测试hd44780 lcd控制器的wiringpi库:
#include <iostream>
#include <wiringPi.h>
#include <lcd.h>
...
int main()
{
init_wiringpi;
fd = lcdInit(2, 16, 4, 11,10 , 0,1,2,3,0,0,0,0) ;
...
return = 0;
}
Build Messages
LCD_first.cpp - undefined reference to `lcdInit'
LCD_first.cpp - undefined reference to `lcdPosition'
LCD_first.cpp - undefined reference to `lcdPuts'
答案 0 :(得分:0)
好的,我只需要将lcd.o添加到Code :: Blocks(设置/编译器/链接器设置/链接库&gt;&gt; /home/pi/wiringPi/devLib/lcd.o)中的链接库列表中。