No good either. We did investigate this as a potential solution; and to
be thorough I tried it again this morning with all the -L and -l and
whatnots. Still the same errors. I added this to the "Hello world"
program in the off-chance that it might work:<br>
<br>
extern "C" {<br>
#include <enet.h><br>
}<br>
<br>
I didn't work. I investigated all the enet header files, they already include this:<br>
<br>
#ifdef _cplusplus // or equivalent, I'm doing this from memory<br>
extern "C" {<br>
#endif<br>
// + same for ending brace<br>
<br>
So the C linkage should already be accounted for.<br>
Darn good idea though, thank you!<br>
<br>
So, the question is still out there, any other ideas (besides just
adding and modding all the source to make it part of my project)?<br><br><div><span class="gmail_quote">On 6/13/05, <b class="gmail_sendername">Marcin Simonides</b> <<a href="mailto:marcin@studio4plus.com">marcin@studio4plus.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">13 Cze 2005 (Poniedziałek) o 10:00 (-0400) Charlie Sibbach napisał(a):
<br><br>> Annoying indeed! I tried the -lenet command, at the very end, and it worked<br>> with gcc and the C-only version. Well, that's major progress but it's not<br>> done yet. I still need to get it working with C++/g++, since that is the
<br>> language the project is using. I tried your fix with that version and I get<br>> the same errors still.<br><br>To use a C library in C++ you need to mark C code for the linker. Google<br>for 'extern "C"'.
<br><br>Try to wrap enet.h in your project with<br><br>extern "C" {<br><br>[declarations in enet.h]<br><br>}<br><br>Sorry, I don't have time to write more, but this should help you use the<br>library (compiled for C) with C++.
<br>I think you should also be able to compile the library with g++, then<br>there sould be no problem with linking with C++.<br>--<br>Marcin Simonides<br><br> "_The_ Zaphod Beeblebrox?"<br> "No, just _a_ Zaphod Beeblebrox; didn't you hear I come in six packs?"
<br> -- D. Adams, "The Restaurant at the End of the Universe"<br><br><br>_______________________________________________<br>ENet-discuss mailing list<br><a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org
</a><br><a href="http://lists.cubik.org/mailman/listinfo/enet-discuss">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br><br><br></blockquote></div>