IrrNet - Irrlicht Network Framework 0.36 (Now Windows/Linux)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
raven_coda
Posts: 89
Joined: Thu Aug 17, 2006 8:11 pm
Location: Salt Lake City, UT, USA
Contact:

I beating my head on a wall!

Post by raven_coda »

Hey can anybody quickly point out what I'm missing? Using Visual Studio, all the files are included in my solution (minus the two unix files) but here's what I'm getting...

Error 7 error LNK2001: unresolved external symbol _enet_time_get protocol.obj

Error 12 error LNK2019: unresolved external symbol _enet_address_set_host referenced in function "public: void __thiscall irr::net::INetManager::setUpClient(void)" (?setUpClient@INetManager@net@irr@@QAEXXZ) NetManager.obj

Can someone help me see what I missing?
Definition of an Upgrade: Take old bugs out, put new ones in.
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

some dll or lib are missing
raven_coda
Posts: 89
Joined: Thu Aug 17, 2006 8:11 pm
Location: Salt Lake City, UT, USA
Contact:

Post by raven_coda »

he he, thanks roxaz but I kindof already knew something was missing, I was hoping someone could show me what :wink:

I finally decided to give up on making enet into a static library and just included everything under the sun in my project. That way I was able to get it to compile. However, I'm getting memory corruption. It occurs during a memcpy (typical :roll: ) in NetManager.cpp line about line 423

Code: Select all

memcpy((char*)&netid,buff+1,2);
I'm just compiling example2 so I'm not doing anything crazy.

Is anybody using Visual Studio 5 and is able to get irrnet .36 to work right?
Definition of an Upgrade: Take old bugs out, put new ones in.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

visual studio 5?

come on dude time for an upgrade seriously.

never used it even.. before my time.

have you tried msvc 8 express?
raven_coda
Posts: 89
Joined: Thu Aug 17, 2006 8:11 pm
Location: Salt Lake City, UT, USA
Contact:

Post by raven_coda »

LOL :lol: sorry, don't know what I was thinking. I am using Visual Studio 8 haven't touch VS5 since middle school. I think I need some sleep! :shock:
Definition of an Upgrade: Take old bugs out, put new ones in.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

If you have already defined WIN32 then I can't tell what is wrong other than looking at your project file, damn I hate these linker errors they piss me off. Try to include all the Enet c files (The enet that comes with irrnet, including the linux ones) and just one enet header file that is "enet.h". Make sure they are all in your linker and include directories. Keep tweaking all the project settings until something works lol.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

I had similar problems with using enet myself.....i solved it by using interafaces. define interfaces for all ur network stuff and compile the code into a dll or something(only usefull for windows users but i guess linux users won'T have problems..)then the useres only have to include ur interface headers and only have to link to ur dll.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
MickeyKnox
Posts: 58
Joined: Tue Apr 10, 2007 7:49 pm
Location: Karlsruhe

Post by MickeyKnox »

I cant get irrnet to compile too:

g++ -I../lib/irrlicht-1.3/include -I/usr/X11R6/include -I../lib/irrNet/ -I../lib/irrNet/enet/include -I../lib/irrNet/enet -O3 -ffast-math source/main.cpp source/RTSCamera.cpp -o tai -L/usr/X11R6/lib -L../lib/irrlicht-1.3/lib/Linux -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
In file included from ../lib/irrNet/irrNet.h:4,
from source/main.cpp:2:
../lib/irrNet/NetManager.h:5:22: error: Irrlicht.h: No such file or directory
../lib/irrNet/NetManager.h:844:5: warning: no newline at end of file
In file included from ../lib/irrNet/irrNet.h:5,
from source/main.cpp:2:
../lib/irrNet/NetAnim.h:87:5: warning: no newline at end of file
In file included from source/main.cpp:2:
../lib/irrNet/irrNet.h:28:5: warning: no newline at end of file
../lib/irrNet/Packets.h:63: error: 'MAX_PATH' was not declared in this scope
../lib/irrNet/NetManager.h:288: error: uninitialized const 'irr::net::NULLRANGE'
make: *** [all_linux] Error 1

The first errors are no big deal (but anoying anyway), but the last two seem serious.

As you can see, i included irrnet as well as enet. To my project i only added:
#include <irrNet.h>
#define UNIX

Am i missing something to include? Or do i have to build irrnet/enet somehow before using it?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

LOL You should define UNIX BEFORE including irrNet, but I think that is not the only problem, do this first then come back with the results I remember getting it to compile fine on linux not too long ago you just need to change some small things that G++ complains about.

Also you have "error: Irrlicht.h: No such file or directory " ?! Are you sure you set up your compiler correctly to detect irrlicht include directory?

OH I see the newly added frame ranges are causing a problem, try the previous version (0.35) from Midnights website http://midnight.shadowedlands.net/ OR

This is not gaurenteed to work but you can modify line 288 of NetManager.h

from

Code: Select all

static const SFrameRange NULLRANGE;
to

Code: Select all


static const SFrameRange NULLRANGE = {
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	0};
And it should work!

Very dodgy looking but it compiles, Im sticking the change up on SVN. I think this might fix monkey's problem too...

The MAXPATH thing shouldnt complain after you move defining linux before including irrnet, but if it still does just guess what kind of variable its supposed to be and declare it somewhere lol :P Personally I think it will just disappear when defining unix.
MickeyKnox
Posts: 58
Joined: Tue Apr 10, 2007 7:49 pm
Location: Karlsruhe

Post by MickeyKnox »

BlindSide wrote:You should define UNIX BEFORE including irrNet
Ok, i changed this
BlindSide wrote:Also you have "error: Irrlicht.h: No such file or directory "
I changed it to irrlicht.h, g++ seems to be more choosy on these things, like the newline warnings
BlindSide wrote:This is not gaurenteed to work but you can modify line 288 of NetManager.h

from

Code: Select all

static const SFrameRange NULLRANGE;
to

Code: Select all


static const SFrameRange NULLRANGE = {
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	0};
And it should work!
It does!
BlindSide wrote:The MAXPATH thing shouldnt complain after you move defining linux before including irrnet, but if it still does just guess what kind of variable its supposed to be and declare it somewhere lol :P Personally I think it will just disappear when defining unix.
Unfortunately it doesnt!
BlindSide wrote:try the previous version (0.35) from Midnights website http://midnight.shadowedlands.net/
Version 0.35 entertaints me with even more compiler errors:

g++ -I../lib/irrlicht-1.3/include -I/usr/X11R6/include -I../lib/irrNet-0.35/ -I../lib/irrNet-0.35/enet/include -I../lib/irrNet-0.35/enet -O3 -ffast-math source/main.cpp source/RTSCamera.cpp -o tai -L/usr/X11R6/lib -L../lib/irrlicht-1.3/lib/Linux -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
In file included from ../lib/irrNet-0.35/irrNet.h:4,
from source/main.cpp:4:
../lib/irrNet-0.35/NetManager.h:5:22: error: Irrlicht.h: No such file or directory
../lib/irrNet-0.35/NetManager.h:740:5: warning: no newline at end of file
In file included from ../lib/irrNet-0.35/irrNet.h:5,
from source/main.cpp:4:
../lib/irrNet-0.35/NetAnim.h:87:5: warning: no newline at end of file
In file included from source/main.cpp:4:
../lib/irrNet-0.35/irrNet.h:28:5: warning: no newline at end of file
../lib/irrNet-0.35/Packets.h:62: error: 'MAX_PATH' was not declared in this scope
../lib/irrNet-0.35/NetManager.h:562: error: default argument for parameter of type 'irr::core::vector3df&' has type 'irr::core::vector3df'
../lib/irrNet-0.35/NetManager.h:563: error: default argument for parameter of type 'irr::core::vector3df&' has type 'irr::core::vector3df'
../lib/irrNet-0.35/NetManager.h:564: error: default argument for parameter of type 'irr::core::vector3df&' has type 'irr::core::vector3df'
../lib/irrNet-0.35/NetManager.h:574: error: default argument for parameter of type 'irr::core::vector3df&' has type 'irr::core::vector3df'
../lib/irrNet-0.35/NetManager.h:575: error: default argument for parameter of type 'irr::core::vector3df&' has type 'irr::core::vector3df'
../lib/irrNet-0.35/NetManager.h:576: error: default argument for parameter of type 'irr::core::vector3df&' has type 'irr::core::vector3df'
make: *** [all_linux] Error 1
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Sweet so switch back to 0.36 and you've almost compiled it! All you gotta do now is stick

Code: Select all

#define MAX_PATH 255
at the top of Packets.h and you should be good to go.
MickeyKnox
Posts: 58
Joined: Tue Apr 10, 2007 7:49 pm
Location: Karlsruhe

Post by MickeyKnox »

Alright, it compiles :)
Thank you
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Some exciting new things are happening at the irrnet SVN on sourceforge. (Search for irrNet in projects).

Version 0.40 will be out soon :D
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

Code: Select all


static const SFrameRange NULLRANGE = {
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
	0};
Use "static const SFrameRange NULLRANGE = {};" and the struct will be initialised to zeros. This is part of the language spec.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

It'd be really awesome if you added the capability to send a struct as a packet.
Post Reply