[ENet-discuss] Newbie error - VC++6
Matija Runkas
matija.runkas at zg.t-com.hr
Tue May 23 07:50:20 PDT 2006
Hi,
thank you for you input, I tried to add enet.lib to Project -> Settings -> Link tab -> Object/library modules, right at the end where
tutorial said you should put ws2_32.lib, tried to compile and then got:
LINK : fatal error LNK1104: cannot open file "enet.lib"
Where do I get enet.lib? (/emote fears you will say " you have to create it and ofc next question would be "how?" :-)
Thank you for your help
Matija
----- Original Message -----
From: Paul Collier
To: Discussion of the ENet library
Sent: Tuesday, May 23, 2006 4:33 PM
Subject: Re: [ENet-discuss] Newbie error - VC++6
Hello,
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.
Hope this helps,
- Paul
On 5/23/06, Matija Runkas < matija.runkas at zg.t-com.hr> wrote:
Hi,
Im a newb in C++ waters so i need some quick help.
Been doing some things in VC++ 6 and it worked nicely, with alot of pain of course :-)
Anyway while working on network FPS game using, well one game engine (dont want advertise here) I found it is cripling me
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
this "thing" work properly I ventured into creating network dll as this engine supports use of such things.
I tried RakNet and did some basic stuff with it unfortunaly they changed their licencing and i dont have $$ to buy it.
So i found Enet, look like very much what I need.
Unfortunaly im a VC newb so I cant get it to work.
I follwed brief instructions on how to get it into my project and I have read trough threads on disscusion board named
"Initialization" and havent found solution.
I have included only:
#include "enet\enet.h"
and added functions that are suposed to only initialize and deinitialize Enet:
#define DLL_USE
#include "adll.h"
//#include "win32.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
engine_bind();
return TRUE;
}
DLLFUNC var DllInitNet(void) //main (int argc, char ** argv)
{
if (enet_initialize () ! {
//fprintf (stderr, "An error occurred while initializing ENet.\n");
return _VAR(1);//return EXIT_FAILURE;
}
atexit (enet_deinitialize);
return _VAR(0);
}
Compiling spits this out and i cant get rid of it:
test1.obj : error LNK2001: unresolved external symbol _enet_deinitialize
test1.obj : error LNK2001: unresolved external symbol _enet_initialize
Debug/test1.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
In other "similar" threads people said "put -lenet" somewhere, but I dont know where to put that, if that would solve it?
Matija
_______________________________________________
ENet-discuss mailing list
ENet-discuss at cubik.org
http://lists.cubik.org/mailman/listinfo/enet-discuss
------------------------------------------------------------------------------
_______________________________________________
ENet-discuss mailing list
ENet-discuss at cubik.org
http://lists.cubik.org/mailman/listinfo/enet-discuss
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 22.5.2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cubik.org/pipermail/enet-discuss/attachments/20060523/9a8248aa/attachment-0001.htm
More information about the ENet-discuss
mailing list