Sign in to follow this  
wortel

Enet/dev-c++

Recommended Posts

wortel    174
Hi, I'm having some problems getting ENet to work with Dev-c++/mingw. Whenever i try to compile my project I get strange errors in the ENet files themselves (in the vein of "trying to convert *int to *u_int32", more or less, though other weird conversions as well). I tried to compile ENet into a static library using MSVC (MSVC's compiler gives those errors as warnings), which i managed after disabling warnings, but i cant seem to get it to work with dev-c++. I think I'm probably just installing it wrong, I'm a bit inexperienced with c++ (I'm used to java), if anybody is using enet with devc++ would you mind writing a quick nOOb friendly guide for using enet? :) Failing that I guess i'll just switch to the codeblocks/.net combination, but I still can't figure out how to get enet to compile without warnings. Which library would you recommend that's similar to enet? It seems to be a real nice library, if only i could get it to work... Thanks...

Share this post


Link to post
Share on other sites
Tylon    181
Yes, I got those errors too, they can be fixed quite simply. I remember there are about 3 or 4 places where there is a similar error.

It is complaining about casting, as in it cant implicitly cast. So all you have to do is cast it is yourself.

I cannot remember what the types were in each case, but it they are assignment statements like x = y...., so all you have to do is change it to x = (type of x) y.....

I am not entirely sure, but I think in the CVS version those might be fixed for you (I understand if you just download the source from the site pre packaged, you are not getting the latest version, even though it says it is an archive of the latest).

Hope this helps

Share this post


Link to post
Share on other sites
wortel    174
I didn't want to post a new thread for this, still getting enet to compile.

In the meantime, how does the polling system work? i.e. what happens if a packet arrives in a time outside a enet_service_host timespan?
do net events just queue up so that you have to call
while(enet_host_service(...,0))

thanks..

Share this post


Link to post
Share on other sites
Tylon    181
Yes, you should be calling enet_host_service quite frequently, but of course a packet is never going to arrive exactly when you call it, so packets are queued up.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this