0

尝试编译一个非常简单的程序来测试 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'  
4

1 回答 1

0

好的,我只需将 lcd.o 添加到 Code::Blocks 中的链接库列表(设置/编译器/链接器设置/链接库 >> /home/pi/wiringPi/devLib/lcd.o)。

于 2017-01-28T09:26:29.620 回答