<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 &lt;iostream&gt;<br><br>extern "C" {<br>&nbsp;&nbsp;&nbsp;&nbsp; #include &lt;enet.h&gt;<br>}<br><br>using namespace std;<br><br>int main()<br>{<br>&nbsp;&nbsp;&nbsp; enet_initialize();<br>&nbsp;&nbsp;&nbsp; cout &lt;&lt; "Hello World" &lt;&lt; endl;<br>&nbsp;&nbsp;&nbsp; enet_deinitialize();<br>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/bits/postypes.h:46,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/iosfwd:49,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/ios:43,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/ostream:45,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/iostream:45,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/bits/ostream.tcc:46,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/ostream:572,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /usr/include/c++/4.2/iostream:45,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from client.cpp:1:<br>/usr/include/c++/4.2/bits/locale_facets.tcc: In member function ¡_InIter std::time_get&lt;_CharT, _InIter&gt;::_M_extract_via_format(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, 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&lt;_CharT, _InIter&gt;::do_get_weekday(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, 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&lt;_CharT, _InIter&gt;::do_get_monthname(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, 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&lt;_CharT, _InIter&gt;::do_get_year(_InIter, _InIter, std::ios_base&amp;, std::_Ios_Iostate&amp;, 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>