[ENet-discuss] Using enet with C++

Bjørn Lindeijer bjorn at lindeijer.nl
Thu Jul 31 00:33:29 PDT 2008


On 7/30/08, ingmar wirths <ingmania at googlemail.com> wrote:
>  > Probably your errors will be gone once you include ENet as follows:
>  >
>  > #include <enet/enet.h>
>  >
>  > And make sure the enet/ directory is not in your compiler's search path.
>  >
>  > I think the tutorial might be missing this... you're at least the
>  > third I've seen doing that and having problems.
>  >
>  > Regards,
>  > Bjørn
>
>
> Thanks, that works. I had indeed the enet include directory in the search path.
>  However, im curious, why is that a problem?

Just take a short look at the files in the enet directory. You'll see
files named "unix.h", "types.h", "time.h", etc. When you put include
files with such generic names in your compiler's global search path,
you're bound to find your compiler include the wrong one at some
point.

Like for example /usr/include/enet/time.h instead of the standard
system header /usr/include/time.h. Judging by your errors this one
seems to have bitten you, since the compiler is complaining about lots
of missing time-related methods.

Regards,
Bjørn


More information about the ENet-discuss mailing list