Substrings

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ALiENiD
Posts: 5
Joined: Fri Mar 17, 2006 6:25 am

Substrings

Post by ALiENiD »

I wanted to use std::string's substr(), but it can't link. Any ideas why? Not implemented? I can use size() for example...
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:
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS = -lstdc++
Post Reply