<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi guys,<br>I'm trying to use Enet in a C++ project for school and it won't compile at all. I keep getting these weird errors that are preventing the project from being built. I'm compiling my code with "g++ -I/usr/local/include/enet client.cpp -lenet"<br><br>Here's my source,<br><br>#include <iostream><br><br>extern "C" {<br> #include <enet.h><br>}<br><br>using namespace std;<br><br>int main()<br>{<br> enet_initialize();<br> cout << "Hello World" << endl;<br> enet_deinitialize();<br> return 0;<br>}<br><br><br>And here's my error,<br><br>In file included from
/usr/include/c++/4.2/cwchar:52,<br> from /usr/include/c++/4.2/bits/postypes.h:46,<br> from /usr/include/c++/4.2/iosfwd:49,<br> from /usr/include/c++/4.2/ios:43,<br> from /usr/include/c++/4.2/ostream:45,<br> from /usr/include/c++/4.2/iostream:45,<br> from client.cpp:1:<br>/usr/include/c++/4.2/ctime:66: error: ¡::clock_t¢ has not been declared<br>/usr/include/c++/4.2/ctime:67: error:
¡::time_t¢ has not been declared<br>/usr/include/c++/4.2/ctime:68: error: ¡::tm¢ has not been declared<br>/usr/include/c++/4.2/ctime:70: error: ¡::clock¢ has not been declared<br>/usr/include/c++/4.2/ctime:71: error: ¡::difftime¢ has not been declared<br>/usr/include/c++/4.2/ctime:72: error: ¡::mktime¢ has not been declared<br>/usr/include/c++/4.2/ctime:73: error: ¡::time¢ has not been declared<br>/usr/include/c++/4.2/ctime:74: error: ¡::asctime¢ has not been declared<br>/usr/include/c++/4.2/ctime:75: error: ¡::ctime¢ has not been declared<br>/usr/include/c++/4.2/ctime:76: error: ¡::gmtime¢ has not been declared<br>/usr/include/c++/4.2/ctime:77: error: ¡::localtime¢ has not been declared<br>/usr/include/c++/4.2/ctime:78: error: ¡::strftime¢ has not been declared<br>In file included from
/usr/include/c++/4.2/locale:46,<br> from /usr/include/c++/4.2/bits/ostream.tcc:46,<br> from /usr/include/c++/4.2/ostream:572,<br> from /usr/include/c++/4.2/iostream:45,<br> from client.cpp:1:<br>/usr/include/c++/4.2/bits/locale_facets.tcc: In member function ¡_InIter std::time_get<_CharT, _InIter>::_M_extract_via_format(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*, const _CharT*) const¢:<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1841: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward
declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1848: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1856: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1863: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1875: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1882: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct
tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1885: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1897: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1902: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1910: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1914: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct
tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1934: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1970: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc:1978: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc: In member function ¡virtual _InIter std::time_get<_CharT, _InIter>::do_get_weekday(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const¢:<br>/usr/include/c++/4.2/bits/locale_facets.tcc:2212: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct
tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc: In member function ¡virtual _InIter std::time_get<_CharT, _InIter>::do_get_monthname(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const¢:<br>/usr/include/c++/4.2/bits/locale_facets.tcc:2261: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br>/usr/include/c++/4.2/bits/locale_facets.tcc: In member function ¡virtual _InIter std::time_get<_CharT, _InIter>::do_get_year(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const¢:<br>/usr/include/c++/4.2/bits/locale_facets.tcc:2290: error: invalid use of incomplete type ¡struct tm¢<br>/usr/include/wchar.h:129: error: forward declaration of ¡struct tm¢<br><br><br>Thanks alot,<br>Robbie<br></div></div><br>
</body></html>