Message-ID: <000901c11176$bb597620$92e97018@ca.nortel.com> From: "Cheryl Strautman" To: Subject: Undefined reference errors for curses functions Date: Fri, 20 Jul 2001 19:50:16 -0400 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0005_01C11155.32E75BC0" 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
The following is the output when I compile with gpp -v
 
C:\Chris\Test>    gpp coltst.cxx -v
Reading = specs from=20 c:/djgpp/lib/gcc-lib/djgpp/2.953/specs
gcc version 2.95.3 = 20010315/djgpp=20 (release)
 c:/djgpp/lib/gcc-lib/djgpp/2.953/cpp0.exe -lang-c++ = -v=20 -D__GNUC__=3D2 -D__GNUG__=3D
2 -D__GNUC_MINOR__=3D95 -D__cplusplus = -Dunix -Di386=20 -DGO32 -DDJGPP=3D2 -DMSDOS -D__u
nix__ -D__i386__ -D__GO32__ = -D__DJGPP__=3D2=20 -D__MSDOS__ -D__unix -D__i386 -D__GO32
 -D__DJGPP=3D2 -D__MSDOS=20 -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386
) = -D__EXCEPTIONS=20 -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ = -D__tune
_pentium__=20 -imacros c:/djgpp/lib/djgpp.ver -remap coltst.cxx=20 c:/djgpp/tmp\ccb0z4
1U.ii
GNU CPP version 2.95.3 20010315/djgpp = (release)=20 (80386, BSD syntax)
#include "..." search starts here:
#include=20 <...> search starts=20 here:
 c:/djgpp/lang/cxx
 c:/djgpp/lib/gcc-lib/djgpp/2.95= 3/include
 c:/djgpp/include
End=20 of search list.
The following default directories have been omitted = from the=20 search=20 path:
 $DJDIR/lib/gcc-lib/djgpp/2.953/../../../../djgpp/includeEnd=20 of omitted list.
 c:/djgpp/lib/gcc-lib/djgpp/2.953/cc1plus.exe=20 c:/djgpp/tmp\ccb0z41U.ii -quiet -d
umpbase coltst.cc -version -o=20 c:/djgpp/tmp\ccX0YD9r.s
GNU C++ version 2.95.3 20010315/djgpp = (release)=20 (djgpp) compiled by GNU C versio
n 2.95.3 20010315/djgpp=20 (release).
 c:/djgpp/bin/as.exe -o c:/djgpp/tmp\ccE133TU.o=20 c:/djgpp/tmp\ccX0YD9r.s
 c:/djgpp/lib/gcc-lib/djgpp/2.953/collect= 2.exe=20 c:/djgpp/lib/crt0.o -Lc:/djgpp/li
b/gcc-lib/djgpp/2.953 = -Lc:/djgpp/bin=20 -Lc:/djgpp/lib c:/djgpp/tmp\ccE133TU.o -lst
dcxx -lm -lgcc -lc -lgcc=20 -Tdjgpp.djl
c:/djgpp/tmp\ccE133TU.o(.text+0x7):coltst.cxx: undefined=20 reference to = `initscr'
c:/djgpp/tmp\ccE133TU.o(.text+0x11):coltst.cxx:=20 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=20 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=20 coltst.cxx.
 
Thanks.
------=_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 #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--