Reputation: 75
I'm trying to use curses.h
library for the first time, but no matter which function I call I still get an error that says
-Symbol(s) not found for Architecture x86_64-
Am i missing some kind of initialization? This is my code
#include <iostream>
#include <unistd.h>
#include<time.h>
#include <sys/ioctl.h>
#include <iomanip>
#include <ncurses.h>
using namespace std;
int main(int argc, const char * argv[]){
string a,b = ("...");
WINDOW *mywindow;
mywindow = initscr();
refresh();
cout<<"Inserisci la frase da passare in coolprint ->";
cin>>a;
coolprint(a);
cout<<endl;
hackprint(a);
coolprint(b);
cout<<endl;
slideprint(a);
fflush(stdin);
getchar();
return 0;
}
I didn't post all the functions but if i take out the calls from curses.h
and use system("clear")
instead, everything works fine.
It's probably some really stupid issue, but i'm kind a newbie with c++.
Hope somebody can help
Thanks.
Upvotes: 4
Views: 4794
Reputation: 69027
It seems you are not linking the ncurses library/usr/lib/libncurses.dylib
into your program...
It is not clear how you are trying to compile the program (makefile, command line, Xcode), so I cannot advise further, but it should be readily done...
In Xcode:
Note: OSX supports unicode very well, however many open-source ./configure scripts choose settings that prevent ncurses from displaying unicode characters.
Upvotes: 5