[ENet-discuss] Linker Errors

Hibame hibame at gmail.com
Sun May 11 14:17:50 PDT 2008


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;
}


More information about the ENet-discuss mailing list