My3D Tools v.3.1 released (with Gile[s] exporter)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Guest

Post by Guest »

Thanks. By reading other code seems a good way of learning, for me anyway.
In this case, I'm still getting the same errors when I compile.
These are Linker Errors.
I have the standard:
../../lib/DevCpp/libz.a
../../lib/DevCpp/libIrrlicht.a
../../lib/DevCpp/libjpeg.a

...set in the parameters. Is there anything else i need to point the compiler to?

and any thoughts on why the my3dexample won't compile? That's stumbling in the code - I don't know what "name lookup of `i' changed for new ISO `for' scoping " and the others mean.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

it's clear you're not adding the necesary libraries for devc to compile the project. Double check if you're setting them properly to: /lib/DevCpp

as for not being able to compile My3d's example, I gues it's due to the fact that zdimitor is including everything with a relative path:
for instance, in main.cpp

Code: Select all

#include "../../my3d_irrlicht_loader/CMY3DMeshFileLoader.h"
but that's because he created a "template" to be able to compile everything locally (examples, plugins, etc) so he's adding all the headers and stuff setting the paths. So also make sure which folders your files are pointing at and you should be ok. If you simply want to add them in the same folder where you got your source file then you have to remove the paths:

Code: Select all

#include "CMY3DMeshFileLoader.h"
let me know if it helped.
luckymutt
Posts: 453
Joined: Sun Mar 06, 2005 11:56 pm
Location: C-Ville

Post by luckymutt »

I'm at a loss. for my own little test, i'm still getting the linker errors. First off, i opened up the parameters and removed what I had in the "add Library" window. Then compiled to see what would show up. Not surprisingly, there were other errors.
So I put the 3 files back in place (using the file browser, so the path is correct) and I when I compile, i still get those three linker errors:

Code: Select all

 [Linker error] undefined reference to `irr::scene::CMY3DMeshFileLoader::CMY3DMeshFileLoader(irr::io::IFileSystem*, irr::video::IVideoDriver*, irr::scene::ISceneManager*)' 
  [Linker error] undefined reference to `irr::scene::CMY3DMeshFileLoader::setTexturePath(char const*)' 
  [Linker error] undefined reference to `irr::scene::CMY3DMeshFileLoader::getChildNodes()' 
are there no other parameters or command line options to pass on to the compiler :?::?::?: This set up is what I've been using for everything up till this point.
_____________________
as for the main.cpp in the example folder...:(...man, I changed the #include lines in the main and *h files, made sure all of the files were copied into my include folder, and made sure the path to the include folder was correct.
For som ereason, when it compiles it wants to disagree with the lines:
Line#.....code on that line.........................error message
99...... "for (i=0; i<ChildNodes.size(); i++)" ........message: name lookup of 'i' changed for newISO 'for' scoping
86...... "for (s32 i=0; i<ChildNodes.size(); i++)"... message: using obsolete binding at 'i'
252.... fps, driver->getPrimitiveCountDrawn()); ...message: invalid conversion from 'int' to 'const wchar_t*'

I'm sorry to take up so much time/space on this, but everything seems to be in the right place...help...please?
Thanks
(oh, and if it makes a difference, its Irr0.8 and DevC++ 4.9.9.2)
peace.
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

2luckymutt

I'm sorry I couldn't help you because i'm usin Visual Studio 6 and everything works fine for me with My3DExamples.

But this error (name lookup of 'i' changed for newISO 'for' scoping) may be eliminated like this, i think

You have in main.cpp:

Code: Select all


// child nodes (if they created while loading process)
for (s32 i=0; i<ChildNodes.size(); i++)
    ChildNodes[i]->setParent(anode);
ChildNodes.clear();

...

// child nodes (if they created while loading process)
for (i=0; i<ChildNodes.size(); i++)
    ChildNodes[i]->setParent(anode);
ChildNodes.clear();

...

// child nodes (if they created while loading process)
for (i=0; i<ChildNodes.size(); i++)
    ChildNodes[i]->setParent(anode);
ChildNodes.clear();

Try to change like this:

Code: Select all


s32 i=0;

// child nodes (if they created while loading process)
for (i=0; i<ChildNodes.size(); i++)
    ChildNodes[i]->setParent(anode);
ChildNodes.clear();

...

// child nodes (if they created while loading process)
for (i=0; i<ChildNodes.size(); i++)
    ChildNodes[i]->setParent(anode);
ChildNodes.clear();

...

// child nodes (if they created while loading process)
for (i=0; i<ChildNodes.size(); i++)
    ChildNodes[i]->setParent(anode);
ChildNodes.clear();

luckymutt
Posts: 453
Joined: Sun Mar 06, 2005 11:56 pm
Location: C-Ville

Post by luckymutt »

@ZDimitor Yup that seemed to do it. Also i had to change the last part from

Code: Select all

         if (lastFPS != fps)
        {           wchar_t tmp[1024];
            swprintf(tmp, 1024, L"MY3D Mesh Loader Example - Irrlicht Engine v.0.8 (fps:%d) Triangles:%d", 
                fps, driver->getPrimitiveCountDrawn());

            device->setWindowCaption(tmp);
to

Code: Select all

 		        if (lastFPS != fps)
        {  core::stringw str = L"MY3D Mesh Loader Example - Irrlicht Engine v.0.8 [";
		  str += driver->getName();
		  str += "] FPS:";
		  str += fps;
          device->setWindowCaption(str.c_str());
it was complaining about the wchar_t bit.
(someday I'll better understand the subtlties at work here, since there seem to be differences in how the code is written depending on your compiler)

But what this has done, is brought me around to the same place as the test I was making...it goes through the compile, ok, but hits a wall with the linking.
Same three link errors as posted above. I am entirely certain that the paths are correct to the libz, libIrrLicht, and libjpeg.
Could there be a similar syntax goof with DevC++ thats not letting it link correctly?
Even thought I don't know entirely what I'm looking at, I'm gonna scan through the headers and see if I can see anything. That's gotta be where it is.

Thanks to everyone for bearing with me.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

luckymutt:

you don't need to add Zdimitor's file to the include folders at all!!

It's an external loader. Simply do this: create a folder for your project i.e. "luckymy3d", copy CMY3DMeshFileLoader.cpp, CMY3DMeshFileLoader.h, my3d-stuff.h and somefuncs.hpp there. Correct the paths to the include files as I told you to make them local to be found by the application. Also create your main.cpp file here (use the one I uploaded as guide). Start a new blank Devc project and include all the files, and you're done!!!
Tesur

Post by Tesur »

I've discovered something peculiar.

Whenever I export a scene from MAX6 to My3d 3.1 it erases all names of my meshes. Any idea why this is happening?
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

I've just started toying around with my3d, and it looks to be really great. But thus far I have been unable to get my source to compile with it. I have everything moved into a seperate folder, and I have corrected all of the paths as I have read in past posts, but to no avail. Here is the compiler log, can anyone offer any help with this matter?
Compiler: Default compiler
Building Makefile: "C:\Programming\Dev-Cpp\Projects\irrBlitz\Makefile.win"
Executing make...
make.exe -f "C:\Programming\Dev-Cpp\Projects\irrBlitz\Makefile.win" all
g++.exe -c my3dIncludes/CMY3DMeshFileLoader.cpp -o my3dIncludes/CMY3DMeshFileLoader.o -I"C:/Programming/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Programming/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Programming/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Programming/Dev-Cpp/include/c++/3.4.2" -I"C:/Programming/Dev-Cpp/include" -I"C:/Programming/irrlicht-0.8/include" -DBUILDING_DLL=1

In file included from my3dIncludes/CMY3DMeshFileLoader.cpp:19:

my3dIncludes/somefuncs.h:178:74: warning: multi-character character constant
my3dIncludes/somefuncs.h:255:68: warning: multi-character character constant
my3dIncludes/somefuncs.h:349:16: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:85:23: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:169:50: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:173:55: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:187:34: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:192:51: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:197:51: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:223:46: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:226:54: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:235:39: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp: In member function `virtual irr::scene::IAnimatedMesh* irr::scene::CMY3DMeshFileLoader::createMesh(irr::io::IReadFile*)':
my3dIncludes/CMY3DMeshFileLoader.cpp:268: warning: deleting `void*' is undefined

my3dIncludes/CMY3DMeshFileLoader.cpp:274:51: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:277:54: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:289:58: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:320:50: warning: multi-character character constant
my3dIncludes/CMY3DMeshFileLoader.cpp:744: error: name lookup of `m' changed for new ISO `for' scoping
my3dIncludes/CMY3DMeshFileLoader.cpp:125: error: using obsolete binding at `m'

make.exe: *** [my3dIncludes/CMY3DMeshFileLoader.o] Error 1

Execution terminated
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

in irrlicht 0.9 you don't need to tweak, include or add anything; since it's natively supported all you gotta do is:

Code: Select all


// set texture path and load .my3d file 
smgr->getStringParameters()->setParameter(scene::MY3D_TEXTURE_PATH, "./data/"); 
scene::IAnimatedMesh* mesh;
mesh = smgr->getMesh("./data/3dfile.my3d");	
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

Didn't realize that it was natively supported in 0.9. Thanks for pointing that out afecelis, it was driving me insane.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

NP Alex!! :D

I hope it fixes your prob!!
zdravkor
Posts: 1
Joined: Thu Apr 07, 2005 9:00 pm

Post by zdravkor »

Tesur wrote:I've discovered something peculiar.

Whenever I export a scene from MAX6 to My3d 3.1 it erases all names of my meshes. Any idea why this is happening?
Hi to all,

The same happens to me, both with Max5.1 and Max6.

Help would be appreciated.

Regards,
Zdravko
ZDimitor
Posts: 202
Joined: Fri Jul 16, 2004 3:27 am
Location: Russia

Post by ZDimitor »

Tesur wrote:I've discovered something peculiar.

Whenever I export a scene from MAX6 to My3d 3.1 it erases all names of my meshes. Any idea why this is happening?
Yes, now i see it!

I gues i'll fix it and update My3D Tools with some other patches in a couple of days.
Testur

Post by Testur »

ZDimitor wrote: Yes, now i see it!

I gues i'll fix it and update My3D Tools with some other patches in a couple of days.
Great.
Post Reply