This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ERROR: Undefined symbol: .std::basic_string<wchar_t>, std::allocator<wchar_t>



> I tried to compile a simple Program (wc.cpp) on a AIX 4.3.3 Server with the GCC 3.2:
> 
> 	gcc wc.cpp -lc -lstdc++
> 
> These are the errors i´m getting:
> 
> 	ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string[in-charge](wchar_t const*, std::allocator<wchar_t> const&)
> 	ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::c_str() const
> 	ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string [in-charge]()
> 	ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
> 	collect2: ld returned 8 exit status
> 
> First i thought these errors are because _GLIB_CPP_USE_WCHAR_T was not defined.
> So i defined _GLIB_CPP_USE_WCHAR_T and rebuilt the compiler but i have still the same errors.
> 
> Maybe you know how i can avoid the problem?
> 
wc.cpp:
	#include <wchar.h>

	int vwscanf ( const wchar_t *format, va_list argptr );
	int vfwscanf ( FILE *stream, const wchar_t *format, va_list argptr );
	int vswscanf ( const wchar_t *buffer, const wchar_t *format, va_list argptr );

	#include <string>

	int main()
	{
	 std::wstring kk = L"KK";
	 printf("%S\n", kk.c_str());
	 return 0;
	}





> yours sincerely
> 
> -----------------------------------------------------
> René Wutschitz
> Invaris Informationssysteme GmbH
> Invariscenter 
> 7000 Eisenstadt
> Tel.: 02682 / 64000 - 534
> mailto:Rene.Wutschitz@Invaris.com
> -----------------------------------------------------
> 
>    
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]