I write program with eclipse in ubuntu and cross g++ compiler,when I include #include <windows.h> return error: fatal error: windows.h: No such file or directory for use arrow key in program directly what to use instead of GetAsyncKeyState(...) or how fix this problem??
1 2 3 4 5 6
if(GetAsyncKeyState(VK_RIGHT)) {
// val = digitalRead(inPin); // read the input pin
// digitalWrite(RPin, val);
digitalWrite(RPin, HIGH);
delay(1000); // waits for a second
digitalWrite(RPin, LOW);
Can I use ncurses library in linux?? why when use #include <curses.h> I have same error . according to other site I should linke gcc main.c -lncurses how do this in eclipse on linux , I new in c ??what should I do?
<Windows.h> is the header for the Windows API. As in... it's the MS Windows operating system.
Ubuntu is Linux, not Windows. So if you're writing a program for Ubuntu you're not going to have anything from Windows available. It's an entirely different OS.
You'll have to find something similar in one of the APIs for Ubuntu... or use a cross-platform library like GTK.