We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 24901

9.1i EDK, GCC - Pure virtual functions cause problems with GCC 3.4.1


What is the relation between having an abstract base class and having to specify the STDIN and STDOUT in the MSS file?

The following simple code causes the error without specifying a stdout/stdin:

class A



virtual void Test(int a = 0) = 0;


class B : public A



void Test(int a) {}


int main(void)


B b;

return 0;


The error message is as follows:

./microblaze_0/lib//libc.a(write.o): In function `write':

write.o(.text+0x34): undefined reference to `outbyte'

write.o(.text+0x58): undefined reference to `outbyte'

collect2: ld returned 1 exit status

make: *** [class/executable.elf] Error 1


This comes from the version of C++ Standard Library shipped with GCC 3.4.1. The library is written for a "hosted" platform, that is, one with features like STDIN and STDOUT. There is a configuration for a non-hosted platform which is supposed to remove such requirements. Xilinx builds C++ with this option. Unfortunately, the support is not fully implemented in GCC 3.4.1. We found and fixed a few such incomplete features in EDK 8.1i, but there are still certain C++ features which pull in the hosted platform requirements. Pure virtual functions are one such feature. Your Class A uses pure virtual functions, which is pulling in this code.

The support is much better in GCC 4.1.1. In 9.1i, GCC 4.1.1 is used for PPC.

AR# 24901
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article