Skip to content

Instantly share code, notes, and snippets.

@Keith-S-Thompson
Created March 3, 2012 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Keith-S-Thompson/1968401 to your computer and use it in GitHub Desktop.
Save Keith-S-Thompson/1968401 to your computer and use it in GitHub Desktop.
ncurses test in response to a question on stackoverflow.com
CPP = g++
CPPFLAGS = -c -Wall -g
LINK = g++
LDFLAGS_LINUX = -lpthread -lncurses
LDFLAGS = $(LDFLAGS_LINUX)
.SUFFIXES:
.SUFFIXES: .o .cpp
.cpp.o:
$(CPP) $(CPPFLAGS) $*.cpp -o $(SRC_DIR)$*.o
skygrid: skygrid.o
$(LINK) $(LDFLAGS) -o $@ $^
clean:
$(RM) -rf *.o skygrid
all: skygrid
skygrid.o: skygrid.cpp
$ make
g++ -c -Wall -g skygrid.cpp -o skygrid.o
g++ -lpthread -lncurses -o skygrid skygrid.o
$ ./skygrid
&stdscr = 0x804a040
$
#include <ncurses.h>
#include <iostream>
int main() {
std::cout << "&stdscr = " << (void*)&stdscr << "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment