So I was writing code for a clear screen function. Everything I had found said to use curse library functions to do this, but I ran into a problem when I had to use initscr()
The given error was as follows:
Undefined symbols for architecture x86_64:
"_initscr", referenced from:
_main in TheGame...I think.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
As far as I can tell the last two lines are a reference to a different error, so if anyone know what that is that would be great. The current code that is throwing an error is:
#include <iostream>
#include <curses.h>
#include <ctime>
using namespace std;
int main(void){
//Initializations
initscr();
srand(static_cast<int>(time(0)));
menu();
return 0;
}
I do know that using namespace std is bad practice, but that is what my book told me to do, menu references a while loop that spreads to other functions by user input that worked perfectly before curses.h
and initscr()
I have tried putting void
and all numbers between 1 and 10 in the parenthesis. Void throws a Parse Issue (Expected '(' for function-style cast or type construction
) while the numbers all threw No matching function for call to 'initscr'
using the recommended *initscr();
throws the same error as just plain initscr()
Any and all help is appreciated!