[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
string class library issues
From: |
Mike Dunlavey |
Subject: |
string class library issues |
Date: |
Wed, 12 Jul 2006 03:51:15 -0700 |
I am a new user of GCC on Windows. The version I have is 2.95.2.
I cannot get this simple file (called test.cpp) to link, due to library
problems.
#include <strclass.h>
//#include <string>
void main (int argc, char **argv){
string s = "Some String";
}
the error from the linker is this:
c:/ccbPZonM.o(.text+0x2f):test.cpp: undefined reference to
`String::String(char const *)'
c:/ccbPZonM.o(.text+0x4f):test.cpp: undefined reference to
`String::~String(void)'
c:/ccbPZonM.o(.text+0x6a):test.cpp: undefined reference to
`String::~String(void)'
collect2: ld returned 1 exit status
If I try the '#include <string>' statement instead of strclass.h, I get a much
more longer
and less helpful list of unresolved references.
I have tried looking for the string class in all the .a files that come with
GCC, without
success.
I would appreciate any help.
Thanks
- string class library issues,
Mike Dunlavey <=