delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/25/14:54:45

From: cnicol AT stk DOT com ("Carl Nicol")
Subject: problem linking class String
25 Apr 1997 14:54:45 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199704251951.PAA23358.cygnus.gnu-win32@kansas.stk.com>
Mime-Version: 1.0
Original-To: <gnu-win32 AT cygnus DOT com>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Original-Sender: owner-gnu-win32 AT cygnus DOT com

I'm trying to build a program with class String from
"String.h", 
and although the compiler finds the include file, it does not seem to be
able to link in the class members, giving the following messages:

C:\PROJECTS\why>g++ -o test test.cc
C:\TEMP/cc0010011.o(.text+0x1d6):test.cc: undefined reference to
`String::String(char const *)'
C:\TEMP/cc0010011.o(.text+0x1e9):test.cc: undefined reference to
`String::operator char const *(void
) const'
C:\TEMP/cc0010011.o(.text+0x214):test.cc: undefined reference to
`String::~String(void)'

g++ reports version:

g++ --version
cygnus-2.7.2-961023

do I need to set another environmental string, or link in a specific
library?

Thanks... Carl Nicol
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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