ALiENiD
Joined: 17 Mar 2006 Posts: 5
|
Posted: Wed Mar 22, 2006 8:47 am Post subject: Substrings |
|
|
I wanted to use std::string's substr(), but it can't link. Any ideas why? Not implemented? I can use size() for example...
| Quote: | cdr.o: In function `extensionMatches(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
cdr.cpp:(.text+0x3c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
cdr.cpp:(.text+0x48): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
cdr.cpp:(.text+0x4c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
cdr.cpp:(.text+0x74): undefined reference to `std::__throw_out_of_range(char const*)'
cdr.cpp:(.text+0x7c): undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
cdr.cpp:(.text+0x90): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)'
|
The file is compiled with psp-g++, as the extension is .cpp, but the project is put together by psp-gcc (I've tried to change to psp-g++, but then it gives other errors inside libglue.c).
Part of my makefile:
| Quote: |
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS = -lstdc++
|
|
|