• Create Account

## enet not recognising definitions or directory

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

6 replies to this topic

219
Like
0Likes
Like

Posted 09 August 2012 - 05:17 AM

hey there,

so im using enet for a programmign project yet there are errors saying it can find the source headers and the functions, even though ive properly linked all the files, is this common for enet?

#include "main.h"
#include <enet/enet.h>
void redNovember::initNetwork()
{
enet_initialize();
}
void redNovember::shutdownNetwork()
{
atexit(enet_deinitialize());
}


im using vs 2010 by the way.,

### #2Hodgman  Moderators

49429
Like
0Likes
Like

Posted 09 August 2012 - 05:20 AM

Can you post the errors?

219
Like
0Likes
Like

Posted 10 August 2012 - 01:53 AM

sure, they are:

Error 1 error C1083: Cannot open include file: 'enet/enet.h': No such file or directory
24 IntelliSense: cannot open source file "enet/enet.h
25 IntelliSense: identifier "enet_initialize" is undefined
26 IntelliSense: identifier "enet_deinitialize" is undefined


i've linked and included everything as the documentation states?

### #4Hodgman  Moderators

49429
Like
0Likes
Like

Posted 10 August 2012 - 03:07 AM

In your project properties, there will be a c++ compiler option called something like "additional include directories". You need to add the parent of the 'enet' directory into that list (either as an absolute path, or a relative path from the project file).

219
Like
0Likes
Like

Posted 10 August 2012 - 05:29 AM

In your project properties, there will be a c++ compiler option called something like "additional include directories". You need to add the parent of the 'enet' directory into that list (either as an absolute path, or a relative path from the project file).

exactly, i have set them as a relative path as i said before, but still i get these errors

### #6Hodgman  Moderators

49429
Like
0Likes
Like

Posted 10 August 2012 - 05:49 AM

Can you post some more info? This isn't an enet problem, it's a visual studio projection configuration problem.
e.g. what's the absolute path of your project file, what's the absolute path of the enet.h file, what include directories do you have set?

### #7Rasterman  Members

206
Like
0Likes
Like

Posted 06 September 2012 - 02:32 PM

I wasted a whole day on this bullshit with VS 2010, I found out it doesn't actually use any of the directories you change in the project properties unless you do a save all or restart VS 2010, maybe that is your problem.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.