When I try to include stdlib.h in my c++ program and compile it using
g++, it returns the following error message:
g++ test5.cpp
In file included from test5.cpp:1:
/usr/include/stdlib.h:239: abort' is already declared in this scope /usr/include/stdlib.h:239: abs’ is already declared in this scope
/usr/include/stdlib.h:240: exit' is already declared in this scope /usr/include/stdlib.h:240: labs’ is already declared in this scope
When I try to include stdlib.h in my c++ program and compile it using
g++, it returns the following error message:
g++ test5.cpp
In file included from test5.cpp:1:
/usr/include/stdlib.h:239: abort' is already declared in this scope /usr/include/stdlib.h:239: abs’ is already declared in this scope
/usr/include/stdlib.h:240: exit' is already declared in this scope /usr/include/stdlib.h:240: labs’ is already declared in this scope
It appears that some C++ header is including/defineing those names. I never
took the time to track it down. But removing it from certain C++ programs
sovles the problem. I too, would love to knopw why this happens and to have
it fixed.
It appears that some C++ header is including/defineing those names. I never
took the time to track it down. But removing it from certain C++ programs
sovles the problem. I too, would love to knopw why this happens and to have
it fixed.
“Igor Sapozhnikov” <> i_sapozh@cs.concordia.ca> > wrote in message
news:> 3BDAEDB3.7371DA4E@cs.concordia.ca> …
Well, this doesn’t really solve the problem. If you don’t include the
stdlib.h, you can’t use the functions it provides, can you?
It appears that some C++ header is including/defineing those names. I never
took the time to track it down. But removing it from certain C++ programs
sovles the problem. I too, would love to knopw why this happens and to have
it fixed.
“Igor Sapozhnikov” <> i_sapozh@cs.concordia.ca> > wrote in message
news:> 3BDAEDB3.7371DA4E@cs.concordia.ca> …
Well, this doesn’t really solve the problem. If you don’t include the
stdlib.h, you can’t use the functions it provides, can you?