delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/20/19:53:24

Message-ID: <000901c11176$bb597620$92e97018@ca.nortel.com>
From: "Cheryl Strautman" <cstrautman AT home DOT com>
To: <djgpp AT delorie DOT com>
Subject: Undefined reference errors for curses functions
Date: Fri, 20 Jul 2001 19:50:16 -0400
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C11155.32E75BC0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0006_01C11155.32E75BC0"


------=_NextPart_001_0006_01C11155.32E75BC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The following is the output when I compile with gpp -v

C:\Chris\Test>    gpp coltst.cxx -v
Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.953/specs
gcc version 2.95.3 20010315/djgpp (release)
 c:/djgpp/lib/gcc-lib/djgpp/2.953/cpp0.exe -lang-c++ -v -D__GNUC__=3D2 =
-D__GNUG__=3D
2 -D__GNUC_MINOR__=3D95 -D__cplusplus -Dunix -Di386 -DGO32 -DDJGPP=3D2 =
-DMSDOS -D__u
nix__ -D__i386__ -D__GO32__ -D__DJGPP__=3D2 -D__MSDOS__ -D__unix =
-D__i386 -D__GO32
 -D__DJGPP=3D2 -D__MSDOS -Asystem(unix) -Asystem(msdos) -Acpu(i386) =
-Amachine(i386
) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ =
-D__tune
_pentium__ -imacros c:/djgpp/lib/djgpp.ver -remap coltst.cxx =
c:/djgpp/tmp\ccb0z4
1U.ii
GNU CPP version 2.95.3 20010315/djgpp (release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/djgpp/lang/cxx
 c:/djgpp/lib/gcc-lib/djgpp/2.953/include
 c:/djgpp/include
End of search list.
The following default directories have been omitted from the search =
path:
 $DJDIR/lib/gcc-lib/djgpp/2.953/../../../../djgpp/include
End of omitted list.
 c:/djgpp/lib/gcc-lib/djgpp/2.953/cc1plus.exe c:/djgpp/tmp\ccb0z41U.ii =
-quiet -d
umpbase coltst.cc -version -o c:/djgpp/tmp\ccX0YD9r.s
GNU C++ version 2.95.3 20010315/djgpp (release) (djgpp) compiled by GNU =
C versio
n 2.95.3 20010315/djgpp (release).
 c:/djgpp/bin/as.exe -o c:/djgpp/tmp\ccE133TU.o c:/djgpp/tmp\ccX0YD9r.s
 c:/djgpp/lib/gcc-lib/djgpp/2.953/collect2.exe c:/djgpp/lib/crt0.o =
-Lc:/djgpp/li
b/gcc-lib/djgpp/2.953 -Lc:/djgpp/bin -Lc:/djgpp/lib =
c:/djgpp/tmp\ccE133TU.o -lst
dcxx -lm -lgcc -lc -lgcc -Tdjgpp.djl
c:/djgpp/tmp\ccE133TU.o(.text+0x7):coltst.cxx: undefined reference to =
`initscr'
c:/djgpp/tmp\ccE133TU.o(.text+0x11):coltst.cxx: undefined reference to =
`endwin'
collect2: ld returned 1 exit status


I am attempting to use curses, and need to include the curses.h file, =
but I don't know what to link with to get the initscr and endwin =
functions.

I have attached autoexec.bat, the go32-v2 output, and the source code of =
coltst.cxx.

Thanks.


------=_NextPart_001_0006_01C11155.32E75BC0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff><FONT face=3DArial size=3D2>
<DIV>The following is the output when I compile with gpp -v</DIV>
<DIV>&nbsp;</DIV>
<DIV>C:\Chris\Test&gt;&nbsp;&nbsp;&nbsp; gpp coltst.cxx -v<BR>Reading =
specs from=20
c:/djgpp/lib/gcc-lib/djgpp/2.953/specs<BR>gcc version 2.95.3 =
20010315/djgpp=20
(release)<BR>&nbsp;c:/djgpp/lib/gcc-lib/djgpp/2.953/cpp0.exe -lang-c++ =
-v=20
-D__GNUC__=3D2 -D__GNUG__=3D<BR>2 -D__GNUC_MINOR__=3D95 -D__cplusplus =
-Dunix -Di386=20
-DGO32 -DDJGPP=3D2 -DMSDOS -D__u<BR>nix__ -D__i386__ -D__GO32__ =
-D__DJGPP__=3D2=20
-D__MSDOS__ -D__unix -D__i386 -D__GO32<BR>&nbsp;-D__DJGPP=3D2 -D__MSDOS=20
-Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386<BR>) =
-D__EXCEPTIONS=20
-Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ =
-D__tune<BR>_pentium__=20
-imacros c:/djgpp/lib/djgpp.ver -remap coltst.cxx=20
c:/djgpp/tmp\ccb0z4<BR>1U.ii<BR>GNU CPP version 2.95.3 20010315/djgpp =
(release)=20
(80386, BSD syntax)<BR>#include "..." search starts here:<BR>#include=20
&lt;...&gt; search starts=20
here:<BR>&nbsp;c:/djgpp/lang/cxx<BR>&nbsp;c:/djgpp/lib/gcc-lib/djgpp/2.95=
3/include<BR>&nbsp;c:/djgpp/include<BR>End=20
of search list.<BR>The following default directories have been omitted =
from the=20
search=20
path:<BR>&nbsp;$DJDIR/lib/gcc-lib/djgpp/2.953/../../../../djgpp/include<B=
R>End=20
of omitted list.<BR>&nbsp;c:/djgpp/lib/gcc-lib/djgpp/2.953/cc1plus.exe=20
c:/djgpp/tmp\ccb0z41U.ii -quiet -d<BR>umpbase coltst.cc -version -o=20
c:/djgpp/tmp\ccX0YD9r.s<BR>GNU C++ version 2.95.3 20010315/djgpp =
(release)=20
(djgpp) compiled by GNU C versio<BR>n 2.95.3 20010315/djgpp=20
(release).<BR>&nbsp;c:/djgpp/bin/as.exe -o c:/djgpp/tmp\ccE133TU.o=20
c:/djgpp/tmp\ccX0YD9r.s<BR>&nbsp;c:/djgpp/lib/gcc-lib/djgpp/2.953/collect=
2.exe=20
c:/djgpp/lib/crt0.o -Lc:/djgpp/li<BR>b/gcc-lib/djgpp/2.953 =
-Lc:/djgpp/bin=20
-Lc:/djgpp/lib c:/djgpp/tmp\ccE133TU.o -lst<BR>dcxx -lm -lgcc -lc -lgcc=20
-Tdjgpp.djl<BR>c:/djgpp/tmp\ccE133TU.o(.text+0x7):coltst.cxx: undefined=20
reference to =
`initscr'<BR>c:/djgpp/tmp\ccE133TU.o(.text+0x11):coltst.cxx:=20
undefined reference to `endwin'<BR>collect2: ld returned 1 exit =
status</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am attempting to use curses, and need to include the curses.h =
file, but I=20
don't know what to link with to get the initscr and endwin =
functions.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have attached autoexec.bat, the go32-v2 output, and the source =
code of=20
coltst.cxx.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks.<BR></DIV></FONT></BODY></HTML>

------=_NextPart_001_0006_01C11155.32E75BC0--

------=_NextPart_000_0005_01C11155.32E75BC0
Content-Type: application/octet-stream;
	name="autoexec.bat"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="autoexec.bat"

C:\PROGRA~1\NETWOR~1\MCAFEE~1\SCAN.EXE C:\
Rem TShoot:=20
set =
PATH=3DC:\DJGPP\BIN;C:\DJGPP\GNU\EMACS\BIN;C:\DJGPP\contirb\pdcur24\pdcur=
ses\;%PATH%
Rem TShoot:=20
set DJGPP=3DC:\DJGPP\DJGPP.ENV
@IF ERRORLEVEL 1 PAUSE
REM [Header]
@ECHO OFF
REM [CD-ROM Drive]
REM [Miscellaneous]
REM [Display]
REM [Sound, MIDI, or Video Capture Card]
REM [Mouse]
rem - By Windows Setup - mscdex.exe /d:IDECD000 /L:M

------=_NextPart_000_0005_01C11155.32E75BC0
Content-Type: application/octet-stream;
	name="go32-v2.out"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="go32-v2.out"

go32/v2 version 2.0 built Dec 24 1999 17:46:57
Usage: go32 coff-image [args]
Rename this to go32.exe only if you need a go32 that can run v2 binaries =
as
 well as v1 binaries (old makefiles).  Put ahead of the old go32 in your =
PATH
 but do not delete your old go32 - leave it in the PATH after this one.
Set GO32_V2_DEBUG=3Dy in the environment to get verbose output.

DPMI memory available: 30495 Kb
DPMI swap space available: 30681 Kb

------=_NextPart_000_0005_01C11155.32E75BC0
Content-Type: application/octet-stream;
	name="coltst.cxx"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="coltst.cxx"

#include <stdio.h>
#include "C:\DJGPP\contrib\pdcur24\curses.h"
#include "C:\DJGPP\contrib\pdcur24\curspriv.h"

void main(void) 
{
  WINDOW* mywin = initscr();
  
  endwin();
}

------=_NextPart_000_0005_01C11155.32E75BC0--

- Raw text -


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