help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loading & Linking Error


From: Matthew Leung
Subject: Loading & Linking Error
Date: Mon, 17 Jan 2005 12:04:50 -0800

Hi.  I keep getting this error in the ld phase of compilation.  What
does undefined reference mean?


make
gcc -g -c Globals.cpp
Globals.cpp:34:2: warning: no newline at end of file
gcc -g -c TeamMaker.cpp
In file included from
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3/backward/strstream:51,
                 from Team.h:6,
                 from TeamMaker.h:7,
                 from TeamMaker.cpp:1:
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or
antiquated header. Please consider using one of the 32 headers found
in section 17.4.1.2 of the C++ standard. Examples include substituting
the <X> header for the <X.h> header for C++ includes, or <sstream>
instead of the deprecated header <strstream.h>. To disable this
warning use -Wno-deprecated.
In file included from TeamMaker.h:7,
                 from TeamMaker.cpp:1:
Team.h: In member function `double Team::MinorityScore(const WeightInfo&) const
   ':
Team.h:137: warning: converting to `int' from `const double'
TeamMaker.cpp:19:2: warning: no newline at end of file
gcc -o TeamMaker Globals.o TeamMaker.o
Globals.o(.text+0x34): In function `LoadFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
/root/Desktop/TeamMaker/Globals.cpp:5: undefined reference to
`std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::c_str() const'
Globals.o(.text+0x4e): In function `LoadFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3/bits/basic_string.h:872:
undefined reference to `std::basic_ifstream<char,
std::char_traits<char> >::basic_ifstream(char const*,
std::_Ios_Openmode)'
Globals.o(.text+0x5c): In function `LoadFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
/root/Desktop/TeamMaker/Globals.cpp:8: undefined reference to
`std::allocator<char>::allocator()'
Globals.o(.text+0x7b):/root/Desktop/TeamMaker/Globals.cpp:8: undefined
reference to `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(char const*, std::allocator<char>
const&)'
Globals.o(.text+0x97): In function `LoadFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3/bits/basic_string.h:872:
undefined reference to `std::allocator<char>::~allocator()'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]