delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/23/07:13:40

From: Mark Collinson <mark DOT collinson AT unn DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: _String.h
Date: Wed, 23 Jun 1999 11:34:40 +0100
Organization: University of Northumbria at Newcastle
Lines: 41
Message-ID: <3770B840.9F1DF77@unn.ac.uk>
NNTP-Posting-Host: monkey.unn.ac.uk
Mime-Version: 1.0
X-Mailer: Mozilla 4.51 [en] (WinNT; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Greetings all,

I am having a spot of trouble with the _String.h file. The C++ compiler
cannot find it. I am trying to compile the following:

#include <iostream.h>
#include <_String.h>

int main() {
	String a;
	
	a="Hello World";
	cout << a << endl;

	return 0;
}

and I get:

C:\mark\code>gxx -Wall -o strtest.exe strtest.cpp
c:/djgpp/tmp\cccygxwf(.text+0x1b):strtest.cpp: undefined reference to
`String::String(void)'
c:/djgpp/tmp\cccygxwf(.text+0x29):strtest.cpp: undefined reference to
`String::~String(void)'
c:/djgpp/tmp\cccygxwf(.text+0x53):strtest.cpp: undefined reference to
`String::~String(void)'

I am using Windows NT, Djgpp was installed using an unzip utility
that did not support long file names and all environment variables we
set correctly, I've tryed compiling the program with LFN=y and LFN=n,
I've tryed #including <strstring.h> instead of #include <_String.h>, the
header file _String.h does exist in the C:\Djgpp\lang\cxx directory, and
I've read section 8.2 of FAQs.

Is there anything else I can try or do or missed.

Any solutions would be gratefully received.

Cheers,
Mark

- Raw text -


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