I'm fairly new to C++ and I'm trying to set up ncurses, but I can't get it to work. Here's the code:
#include <iostream>
#include <string>
#include <ncurses.h>
int main(){
initscr();
printw("Hello World !!!");
refresh();
getch();
endwin();
return 0;
}
With this file I get 'undefined reference' errors
And here is the makefile:
main.o: main.cpp ncurses.h
g++ main.cpp -o crawler -lncurses
The error I get with the makefile is :
make: *** No rule to make target `ncurses.h', needed by `main.o'. Stop.
Thanks for your help!
Note: I am using Ubuntu 12.04 with Geany and g++