[ENet-discuss] Linker Errors
Marc Rochel
marc.rochel at udicom.de
Sun May 11 14:57:41 PDT 2008
Hi !
You have to link with enet.lib . That's where those functions are defined.
Marc
-----Ursprüngliche Nachricht-----
Von: enet-discuss-bounces at cubik.org [mailto:enet-discuss-bounces at cubik.org] Im Auftrag von Hibame
Gesendet: Sonntag, 11. Mai 2008 23:18
An: enet-discuss at cubik.org
Betreff: [ENet-discuss] Linker Errors
I am a bit of a noob with visual studio so when I looked in the
archives for the solution to the errors I was not quite clear as to
what is needed to fix them so any help would be very much appreciated.
This is the errors I am getting:
1>main.obj : error LNK2019: unresolved external symbol
_enet_deinitialize referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol
_enet_initialize referenced in function _main
1>C:\test\Debug\client.exe : fatal error LNK1120: 2 unresolved externals
The code is as follows:
#include <winsock2.h>
#include <string.h>
#include <iostream>
using namespace std;
#include <enet.h>
int main() {
if(enet_initialize() != 0)
{
fprintf(stderr, "An error occurred while initializing ENet.\n");
return EXIT_FAILURE;
}
atexit(enet_deinitialize);
return 0;
}
_______________________________________________
ENet-discuss mailing list
ENet-discuss at cubik.org
http://lists.cubik.org/mailman/listinfo/enet-discuss
More information about the ENet-discuss
mailing list