Using c++ with xilinx EDK tools

Hi,

We're trying to compile C++ code to run on a xilinx microblaze platform. Most things work OK, but we seem to be failing to use some of the standard templates (see code snippet below).

It would appear that none of the string methods are used or functional. Has anyone come across this issue and succesfully found a resolution?

Thanks,

Stef

void string_test() { string str1; string *str2 = new string(); char str3[] = "Hello world\n"; char *str4 = new char[100];

str2->assign (str3); str1.assign (str3, strlen(str3));

strcpy(str4, "My world!");

printf("str1 = %s\n",str1.c_str()); printf("str2 = %s\n",str2->c_str()); printf("str3 %s\n", str3); printf("str4 [%p] = %s\n",str4, str4); }

results in the following output:

str1 = str2 = str3 Hello world str4 [0x80032a0c] = My world!

Reply to
Stef
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.