www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/25/01:42:30

Subject: PDCurses problems..
From: Eric Newton <korath AT attbi DOT com>
To: "djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
Organization:
Message-Id: <1040797576.7324.19.camel@first>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.1-
Date: 25 Dec 2002 01:26:16 -0500
Reply-To: djgpp AT delorie DOT com

Hello,
	I am trying to compile my curses program to DOS. I have sucessfully
installed DJGPP as a cross-compiler on UNIX, it can sucessfully build
DOS programs as well. But what I am having trouble with is PDCurses;
here is what I have done to install PDCurses:

<I downloaded and untared PDCurses-2.5>
#cd PDCurses-2.5
<I built PDCurses by doing: ./configure, make, make install>
#cp /usr/lib/libpdcurses.a
/usr/local/compiler/cross/djgpp/lib/gcc-lib/i586-pc-msdosdjgpp/3.2.1/
#cp curses.h
/usr/local/compiler/cross/djgpp/include/c++/3.2.1/

I then tried compiling a simple curses program:
#include <curses.h>

int main()
{
  initscr();
  wclear(stdscr);
  waddstr(stdscr, "hello world");
  wrefresh(stdscr);
  getch();
  endwin();
}

#djgpp -lpdcurses test.cpp -o test.exe
I get the following errors:
/tmp/cc6N4pyq.o(.text+0x1d):test.cpp: undefined reference to `_initscr'
/tmp/cc6N4pyq.o(.text+0x22):test.cpp: undefined reference to `_stdscr'
/tmp/cc6N4pyq.o(.text+0x33):test.cpp: undefined reference to `_stdscr'
/tmp/cc6N4pyq.o(.text+0x38):test.cpp: undefined reference to `_wmove'
/tmp/cc6N4pyq.o(.text+0x44):test.cpp: undefined reference to `_stdscr'
/tmp/cc6N4pyq.o(.text+0x49):test.cpp: undefined reference to
`_wclrtobot'
/tmp/cc6N4pyq.o(.text+0x5a):test.cpp: undefined reference to `_stdscr'
/tmp/cc6N4pyq.o(.text+0x5f):test.cpp: undefined reference to `_waddstr'
/tmp/cc6N4pyq.o(.text+0x6b):test.cpp: undefined reference to `_stdscr'
/tmp/cc6N4pyq.o(.text+0x70):test.cpp: undefined reference to `_wrefresh'
/tmp/cc6N4pyq.o(.text+0x7c):test.cpp: undefined reference to `_stdscr'
/tmp/cc6N4pyq.o(.text+0x81):test.cpp: undefined reference to `_wgetch'
/tmp/cc6N4pyq.o(.text+0x89):test.cpp: undefined reference to `_endwin'
collect2: ld returned 1 exit status

It obviously finds the pdcurses lib or it would have given me an error,
what am I doing wrong?

Thanks,
Eric Newton

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019