0

I wrote a sample code using ENet, which was working fine under Linux but on Windows, enet_host_create returns NULL. This is a strange behavior since enet_host_create is one of the first function called while using ENet, previously any connection attempt.

MadMass
  • 313
  • 3
  • 10

1 Answers1

0

enet_host_create returns NULL on Windows when you don't call enet_initialize() previously. Don't forget to call enet_deinitialize() when you're done with the library, or at the exit of your program.

A program using ENET without calling the initialize function could work on linux since this function doesn't do much on this platform. But on Windows, it will fail.

Thanks to the ENet community for their help resolving this issue.

MadMass
  • 313
  • 3
  • 10