Using c++ with xilinx EDK tools

Feb 18, 2005 0 Replies

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!


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required