http://ms-iot.github.io/content/16x2LCD.htmから Intel Galileo でいくつかのサンプル コードを実行しようとしています。
基本的にLCDモジュールに文字を書き込むだけです。LiquidCrystal ライブラリは、異なるライブラリからの複合クラスのため、Visual Studio では機能しません。クラスPrintとオブジェクトprintが異なるクラスで使用され、複合されているため、基本的にコンパイルエラーC2653とその他のエラーが発生します。エラーを修正する方法を知っている人
error C2011: 'Print' : 'class' type redefinition
class Print{
private: int write_error;
error C2039: 'print' : is not a member of 'LiquidCrystal'
lcd.print("Hello!");
error C2504: 'Print' : base class undefined
class LiquidCrystal : public Print { public:
error C2873: 'write' : symbol cannot be used in a using-declaration,
using Print::write;
error C2027: use of undefined type 'Print'
using Print::write;
error C2873: 'write' : symbol cannot be used in a using-declaration
using Print::write;
問題は、名前空間が認識されていないことと、LCD ディスプレイへの書き込みに Print を使用する LCD クラスでの Print.h の使用が多用されていることによるものだと思います。
Print.h が呼び出されるたびに再定義されないように、LCD クラスで Print の関数を呼び出すにはどうすればよいですか?