Menu

#60 g++ 4.3 > compilation issue

LTK-CPP
open
nobody
None
5
2010-03-19
2010-03-19
hiroto
No

Before g++ 4.3, there were many unecessary cross inclusion of header file thus many code were accidentally compiled without proper inclusion of C header files.

There were two different kind of errors in ltkcpp which are failing with g++ 4.3 and higher.

1) use of time_t without inclusion of time.h

ltkcpp_genout.cpp includes ltpcpp.h which includes ltkcpp_connection.h. ltkcpp_connection.h uses "time_t" but time.h is never explicitly included. ltkcpp_connection.h is also included by ltkcpp_connection.cpp but ltkcpp_connection.cpp does include time.h.

2) use of "exit" without inclusion of stdlib.h.

This is really annoying but you cannot even say "exit" without explicitly including stdlib.h anymore. Following files fail to compile due to this.

Examples/example1.cpp
Tests/dx101.cpp
Tests/dx201.cpp

Discussion


Log in to post a comment.