Forum Discussion
Altera_Forum
Honored Contributor
21 years ago --- Quote Start --- originally posted by kwokwong@Dec 29 2004, 10:51 AM hi all,
we got this error if we use the (small) newlib c library:
-- start --
error pure.o * in function `__cxa_pure_virtual': undefined reference to `fwrite' pact_sb line 0
-- end
fyi: we do remove/comment all printf statements
how can we get rid of this error?
any one helps?
regards,
kwok wong --- Quote End --- The reference is made in the file pure.cc: --start --# ifdef _GLIBCPP_HAVE_UNISTD_H# include <unistd.h># define writestr(str) write(2, str, sizeof(str) - 1)# ifdef __GNU_LIBRARY__ /* Avoid forcing the library's meaning of `write' on the user program by using the "internal" name (for use within the library). */ /*# define write(fd, buf, n) __write((fd), (buf), (n))*/# endif# else# include <cstdio># define writestr(str) std::fputs(str, stderr)# endif extern "C" void __cxa_pure_virtual (void) { writestr ("pure virtual method called\n"); std::terminate (); } -- end Who can tell what this funtions does and/or which ohter (libray) funtion requires this functions?