Hello,<br><br>Yeah, you have to link against the enet library in order to use it. You should probably go read up about this sort of thing, you'll likely have to do it again ;D That -lenet line doesn't apply to VC++, that's GCC command-line style. For VC++, you'll probably have to go into your Project Settings in the Linker section and add
enet.lib to the list of libraries that the project needs.<br><br>Hope this helps,<br>- Paul<br><br><div><span class="gmail_quote">On 5/23/06, <b class="gmail_sendername">Matija Runkas</b> <<a href="mailto:matija.runkas@zg.t-com.hr">
matija.runkas@zg.t-com.hr</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;"><div>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Im a newb in C++ waters so i need some quick
help.</font></div>
<div><font face="Arial" size="2">Been doing some things in VC++ 6 and it worked
nicely, with alot of pain of course :-)</font></div>
<div><font face="Arial" size="2">Anyway while working on network FPS game using,
well one game engine (dont want advertise here) I found it is cripling
me</font></div>
<div><font face="Arial" size="2">since I am able to create games for only 4 players
and its perfromance is not what I expected. In order to learn more and make
</font></div>
<div><font face="Arial" size="2">this "thing" work properly I ventured into creating
network dll as this engine supports use of such things.</font></div>
<div><font face="Arial" size="2">I tried RakNet and did some basic stuff with it
unfortunaly they changed their licencing and i dont have $$ to buy
it.</font></div>
<div><font face="Arial" size="2">So i found Enet, look like very much what I
need.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Unfortunaly im a VC newb so I cant get it to
work.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I follwed brief instructions on how to get it
into my project and I have read trough threads on disscusion board named
</font></div>
<div><font face="Arial" size="2">"Initialization" and havent found
solution.</font></div>
<div><font face="Arial" size="2">I have included only:</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"><em>#include "enet\enet.h"</em></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">and added functions that are suposed to only
initialize and deinitialize Enet:</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"><em>#define DLL_USE<br>#include
"adll.h"</em></font></div>
<div><em></em> </div>
<div><font face="Arial" size="2"><em></em></font> </div>
<div><em></em> </div>
<div><font face="Arial" size="2"><em>//#include "win32.h"</em></font></div>
<div><em></em> </div>
<div><font face="Arial" size="2"><em>BOOL APIENTRY DllMain( HANDLE hModule,
<br>
DWORD ul_reason_for_call,
<br>
LPVOID lpReserved<br>
)<br>{<br> engine_bind();<br> return
TRUE;<br>}</em></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"><em>DLLFUNC var DllInitNet(void) //main (int argc,
char ** argv) <br>{<br> if (enet_initialize () !=
0)<br> {<br>
//fprintf (stderr, "An error occurred while initializing
ENet.\n");<br> return _VAR(1);//return
EXIT_FAILURE;<br> }<br> atexit
(enet_deinitialize);<br> return _VAR(0);<br>}</em></font></div>
<div><em><font face="Arial" size="2"></font></em> </div>
<div><font face="Arial" size="2">Compiling spits this out and i cant get rid of
it:</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"><em>test1.obj : error LNK2001: unresolved external
symbol _enet_deinitialize<br>test1.obj : error LNK2001: unresolved external
symbol _enet_initialize<br>Debug/test1.dll : fatal error LNK1120: 2 unresolved
externals<br>Error executing link.exe.</em></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">In other "similar" threads people said "put -lenet"
somewhere, but I dont know where to put that, if that would solve
it?</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Matija</font></div></div>
</div><br>_______________________________________________<br>ENet-discuss mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">
http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br><br><br></blockquote></div><br>