1

I am using Xcode to program c++ projects. I am using ncurses library. I am create a simple example, which works fine on terminal, but it does not work using xcode.

#include<ncurses.h>
#include<iostream>
int main()
{
    char c;
    initscr();
    printw("Hello world!");
    refresh();
    c=getch();
    endwin();
    return 0;

}

On Xcode I get this error Error opening terminal: unknown.

I am wondering that Xcode is not able to emulate an terminal. So, I try to change the "build phase" in xcode in order to build my project on terminal. I have used the proposed solution Automatically open terminal when debugging in Xcode? But my project continue to run on xcode. What is the problem?

Community
  • 1
  • 1
Jeanne
  • 1,241
  • 3
  • 19
  • 28

0 Answers0