One reply question

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

fullforce wrote:Ok so from what I understand. Irrlicht comes pre compiled so the only thing I need right now is a IDE to make a EXE, did I get that right?
Right, you got it... ;)
fullforce wrote:and if I only need a IDE then I guess I need to ask my original question, how do I fix the bug in MS VC++2005 or which is a better IDE and is there some manual to use it, because I figured out that MSVC++2005 used the .NET parts of the tutorials by trial and error, but if I use a new IDE then I'll need to know which parts of the manual to use (because there are many different parts for different IDE's)
Don't take it personally, but are we talking japanese ????
In my last post I gave you 3 examples of IDEs you can use !!!
In my oppinion Code::Blocks is the best choice...
For all 3 IDEs are tutorials avilable (have a search at the forum for them)...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
fullforce
Posts: 55
Joined: Sat Jun 03, 2006 5:23 pm

Post by fullforce »

Ok I'll do a Google search and download one of the programs and then search for a tutorial with irrlicht ("using __________ with irrlicht") codeblocks does look like the best, but it says I need a program no longer available, so I'll try one of the others, thanks.

(The only reason I ask is codeblocks requires something you can't get DevCpp all the download links are broken for the main program and MSVC++ has the error that I asked how to correct. I'll try looking for them again :) )
gfxstyler
Posts: 222
Joined: Tue Apr 18, 2006 11:47 pm

Post by gfxstyler »

you should really use . or , sometimes - really makes things more readable :?

what does codeblocks need which is not available anymore??? this is nonsense.

and the devc++ link still works.

see you!
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Right...
For C::B use the nightly builds, they're located here:
http://forums.codeblocks.org/index.php?board=20.0
Just download all files and unzip them...
You need:
  • mingw10m.dll
    wxmsw26_gcc_cb
    CB_20060608_rev2539_win32 (Code::Blocks)
all files can be found in the threads !!![/list]
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
cypher543
Posts: 78
Joined: Sat Apr 15, 2006 5:24 pm
Location: Missouri, USA
Contact:

Post by cypher543 »

This seems like a lot more that one reply. :P
RustyNail
Posts: 168
Joined: Fri Jun 02, 2006 1:49 pm
Contact:

Post by RustyNail »

cypher543 wrote:This seems like a lot more that one reply. :P
:P :D :P

I agree.

So far I have not had any problems with DevC++, but I prefer MSVC++6.0 because I have used it longer and have been able to compile Quake 2 on it..... I'm Conservative. :lol:
I have recently discovered that both the Flu and my Algebra teacher have exact the same effect on my health: it quickly degrades.
drac_gd
Posts: 132
Joined: Sun Apr 09, 2006 8:43 pm

Post by drac_gd »

If your using the VStudio Toolkit you are probably missing the lib from the .Net Frame work. check this link
http://www.blender3d.org/cms/Microsoft_ ... 276.0.html
If you are using VStudio 6 or better then somthing is wrong with your installation. Try reinstalling or do a search for the lib and when you find it go to menu Tools/Options. In the options dialog expand projects folder ( you may have to scroll down to see it) then click directories. In the show directories for drop down box select libraries. double click in a blank spot at bottom of list. You wil see a button with ... on it click it to browse to the directory with you library.

It is better to use relative paths if you may work on your project on more than one computer but this is the easiest way. In general if your program cannot find a lib use this method. If it cannont find a header then use the includes from the drop down box.
fullforce
Posts: 55
Joined: Sat Jun 03, 2006 5:23 pm

Post by fullforce »

Ok, (I noticed it was more than one post but I don't want to start a ton of new posts and spam up the board)

I got code blocks up and running , I tried to follow some of the examples given on the boards on how to build example 1, but they ended with the exe saying "This application has failed to start because Irrlicht.dll was not found. I didn't have this problem with Microsoft Visual because in tutorial 1 it explained how to set it up (I assume that’s why) and despite me attempting to add dll paths the problem has remained the same. Could anyone tell me how to link the dll's into code blocks.
drac_gd
Posts: 132
Joined: Sun Apr 09, 2006 8:43 pm

Post by drac_gd »

find your irrlicht.dll you compiled and put in the same directory as your executable.

or the better way

If you are using same folder stucture as irrlitch then go to your linker settings in both irrlicht and your project. ( if using vc then right click project and select settings then the linker folder then output)
make the output ( the .exe or .dll) go to same directory as the other irrlicht demos.
fullforce
Posts: 55
Joined: Sat Jun 03, 2006 5:23 pm

Post by fullforce »

I have never compiled a irrlicht.dll but since it appears to be the same I copied it from one of the pre made demos into the directory.
So I copied over the correct files for code blocks into a folder, opened tutorial 1 clicked build, then copyed the irrlicht.dll in and now it says'
"The procedure entry point _ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERLMS_4core11dimension2dIiEEjbbbPNS... Could not be located in the dynamic link library Irrlicht.dll."
What can I do to help it find this or is there another file I should build first to help if find the procedure entry point?
fullforce
Posts: 55
Joined: Sat Jun 03, 2006 5:23 pm

Post by fullforce »

I have been all throughout the forums with the search tool with a fine tooth comb and I can't find any tutorial on how to set up the .dll's with codeblocks. You guys said go get your hands dirty and look it up, and I have I found about every post with codeblocks in it and the obvious codeblocks tutorial for compiling irrlicht. http://irrlicht.sourceforge.net/tut_codeblocks.html (requiring a program that’s no longer available, and allot of other stuff that looks like I could just use the pre compiled version of the engine instead of recompiling it, and also not helping me compile a good exe with the files needed.)

So I come to you, so unsure of what to do, so I must as if anyone knows how to properly set up codeblocks with the .dlls?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

fullforce wrote:I have never compiled a irrlicht.dll but since it appears to be the same I copied it from one of the pre made demos into the directory.
Did you not using C::B !?!?!
So you can't use the dll from the precompiled demos (it's the one for MSVC++) !!!

I'm really curious about how you will write games, even you don't check such simple thinks after a 3 sides thread just about this !?!?!?! :roll:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

naah , recompiling recompiling
let me tell how you can make the engines member functions do your stuff without recompiling the engine. Let say you want to edit function setText of CTextSceneNode class, whichs declaration is below

Code: Select all

namespace irr
00011 {
00012 namespace scene
00013 {
00014 
00016 class ITextSceneNode : public ISceneNode
00017 {
00018 public:
00019 
00021         ITextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, 
00022                 const core::vector3df& position = core::vector3df(0,0,0))
00023                         : ISceneNode(parent, mgr, id, position) {}
00024 
00026         virtual void setText(const wchar_t* text) = 0;
00027 
00029         virtual void setTextColor(video::SColor color) = 0;
00030 };
00031 
00032 } // end namespace scene
00033 } // end namespace irr
realize the class scene::ITextSceneNode is derived from scene::ISceneNode. All you have to do is to create a class, lets call it a IMyTextSceneNode that is derived from ITextSceneNode and add only one function to it, the one you want to edit the body of, we said the function is virtual void setText(const wchar_t* text) = 0;. So this is the declaration of new class

Code: Select all

namespace irr
00011 {
00012 namespace scene
00013 {
00014 
00016 class IMyTextSceneNode : public ITextSceneNode
00017 {
00018 public:
00019 
00021         IMyTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, 
00022                 const core::vector3df& position = core::vector3df(0,0,0))
00023                         : ISceneNode(parent, mgr, id, position) {}
00024 
00026         virtual void setText(const wchar_t* text) = 0;
00027 
00030 };
00031 
00032 } // end namespace scene
00033 } // end namespace irr
we needed only constructor and destructor.. (thus I can't see the destructor in CTextSceneNode, interesting) and the function we edit. In cpp file (new one of course) we edit the body of the function and include both CMyTextSceneNode.cpp and CMyTextSceneNode.h to project source files. and in code, we dodn't use CTextSceneNode* instacies but CMyTextSceneNode* instancies for our node, thus the node will use the new edited function and use all the others of originall irrlicht CTextSceneNode, becouse it is derived from CTextSceneNode. My coding looks like this

Code: Select all

scene::SMyAnimatedMesh mesh=....;
scene::SMyAnimatedMeshSceneNode node=....;
:wink:
so the point is to keep irrlicht core untouched and derive your own stuff up from it. It keeps better order because you can see what you changed and you want mess up anything, because anytime you can switch to original irrlicht classes
what is this thing...
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

so how do you edit or add functions/vars they are declared private, protected or even inline within the source ???

For the TextSceneNode (CTextSceneNode.h):

Code: Select all

namespace irr
{
namespace scene
{

	class CTextSceneNode : public ITextSceneNode
	{
	public:

		//! constructor
		CTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
			gui::IGUIFont* font, scene::ISceneCollisionManager* coll,
			const core::vector3df& position = core::vector3df(0,0,0), const wchar_t* text=0,
			video::SColor color=video::SColor(100,0,0,0));

		//! destructor
		virtual ~CTextSceneNode();

		virtual void OnPreRender();

		//! renders the node.
		virtual void render();

		//! returns the axis aligned bounding box of this node
		virtual const core::aabbox3d<f32>& getBoundingBox() const;

		//! returns amount of materials used by this scene node.
		virtual s32 getMaterialCount();

		//! sets the text string
		virtual void setText(const wchar_t* text);

		//! sets the color of the text
		virtual void setTextColor(video::SColor color);
		
		//! Returns type of the scene node
		virtual ESCENE_NODE_TYPE getType() { return ESNT_TEXT; }

	private:

		core::aabbox3d<f32> Box;
		core::stringw Text;
		video::SColor Color;
		gui::IGUIFont* Font;
		scene::ISceneCollisionManager* Coll;
	};

} // end namespace scene
} // end namespace irr
So how do you now change for example Font to an array (gui::IGUIFont* Font[anzFonts];) !?!?!?!

Well, this is an bad example, but you can't edit such thinks without recompiling the dll !!!
Beleive me, I didn't take all the work on me if it was that simple... ;)

On the other side, we're never to old for learning...
So if you know a simpler way than recompiling, let me know !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, it's as easy as this:
- Copy CTextNode.cpp and .h to CMyTextNode.cpp and .h
- Change the things necessary in CMyTextSceneNode.*
- Use the original library and add your scene node by adding the .o to either an additional dll or lib file and compile also against this library

you only need to access the original code and alter it when fixing bugs or removing limitations in the API. The mentioned process has one drawback, though: changes to CTextSceneNode do not propagate to your files. So you might loose some advancements when not tracking the "base classes" in each release. If Irrlicht would export all symbols (i.e. also those in CSomething files) you could use real inheritance and thus reduce the amount of duplicated code. But it really depends on the situation/setting whether this is really useful.
Post Reply