hi,
i am new to the mac, and just started using xcode. i recently learned that the conio.h - i used its getch function regularly - header file doesn't exist on unix platforms. searching for an alternative i found that the curses.h header file provides a similar function.
i tried to write and compile this basic program in xcode but it gives me errors.
#include <iostream>
#include <curses.h>
using namespace std;
int main () {
cout << "Hello, World!" <<endl;
getch();
return 0;
}
xcode gives me 2 building errors:
1) "_stdscr", referenced from:
_stdscr$non_lazy_ptr in main.o
2) "_wgetch", referenced from:
_main in main.o
symbol(s) not found
collect2: Id returned 1 exit status
what should i do to get this program working (i'd rather compile directly from xcode rather than from console - i'm not too familiar with the latter). can anyone point me in the right direction?
P.S. I'm running xcode 3 on an intel iMac with leopard installed.
i am new to the mac, and just started using xcode. i recently learned that the conio.h - i used its getch function regularly - header file doesn't exist on unix platforms. searching for an alternative i found that the curses.h header file provides a similar function.
i tried to write and compile this basic program in xcode but it gives me errors.
#include <iostream>
#include <curses.h>
using namespace std;
int main () {
cout << "Hello, World!" <<endl;
getch();
return 0;
}
xcode gives me 2 building errors:
1) "_stdscr", referenced from:
_stdscr$non_lazy_ptr in main.o
2) "_wgetch", referenced from:
_main in main.o
symbol(s) not found
collect2: Id returned 1 exit status
what should i do to get this program working (i'd rather compile directly from xcode rather than from console - i'm not too familiar with the latter). can anyone point me in the right direction?
P.S. I'm running xcode 3 on an intel iMac with leopard installed.