[MacOSX] Fails to link with Irrlicht 1.1. SVN

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.
Post Reply
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

[MacOSX] Fails to link with Irrlicht 1.1. SVN

Post by jonasled »

Checked out Irrlicht 1.1 SVN revision 239. It compiles, but when I try to link to the "libIrrlicht.a" I get a build error in Xcode:

Code: Select all

/usr/bin/ld: Undefined symbols:
irr::video::ITriangleRenderer2::setTexture(unsigned int, irr::video::CSoftwareTexture2*)
irr::video::ITriangleRenderer2::setRenderTarget(irr::video::IImage*, irr::core::rect<int> const&)
irr::video::ITriangleRenderer2::ITriangleRenderer2(irr::video::IZBuffer2*)
irr::video::ITriangleRenderer2::~ITriangleRenderer2()
irr::video::ITriangleRenderer2::~ITriangleRenderer2()
irr::video::ITriangleRenderer2::~ITriangleRenderer2()
typeinfo for irr::video::ITriangleRenderer2
virtual thunk to irr::video::ITriangleRenderer2::~ITriangleRenderer2()
virtual thunk to irr::video::ITriangleRenderer2::~ITriangleRenderer2()
This looks like the Xcode project is out of sync with the latest changes! If I do not remember to add "writepng.c" I get some Undefined symbols errors for that as well. What files do I need to add or is something else the matter?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Add ITriangleRenderer2.cpp to the project.
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

Thanks

Post by jonasled »

vitek wrote:Add ITriangleRenderer2.cpp to the project.
Thanks! Stupid me, that was pretty obvious once you pointed it out. :oops:

EDIT: In SVN revision 242 the following results in a build error on MacOS X and Linux:

Code: Select all

#ifdef _IRR_WINDOWS_

	c8 fpath[_MAX_PATH];
	p = _fullpath( fpath, filename.c_str(), _MAX_PATH);
	ret = p;

#elif (defined(LINUX) || defined(MACOSX))

	c8 fpath[PATH_MAX];
	p = realpath(filename.c_str(), fpath);
	ret = p;

#endif

Code: Select all

CFileSystem.cpp:183: error: 'PATH_MAX' was not declared in this scope
CFileSystem.cpp:184: error: 'fpath' was not declared in this scope
CFileSystem.cpp:184: error: 'realpath' was not declared in this scope
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Fixed in revision 243 (but needs some more work because the realpath function is BAD :evil: )
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

oops sorry.. haven't got a linux box or a mac to test on :oops:
how is realpath bad? should it check for existence of the file before calling, or is there something really ugly about this function? i searched google but couldn't find anything
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you read the man page of the function you'll find the note "Don't ever use this method". Basically because the MAX_PATH is not necessarily long enough and thus buffer overruns may occur. There is no alternative proposed, though.
jmiles
Posts: 19
Joined: Mon Oct 23, 2006 11:07 pm

Post by jmiles »

I apologize for being such a noob on this one, but...I am getting the same undefined symbols errors when building the samples. I have tried to add ITriangleRenderer2.cpp to the project but must not know what I am doing. I right clicked on the heading MacOSX-Irrlicht-Engine then selected add-existing files and added ITriangleRenderer2.cpp and on building again, received the same error...what did I do wrong?

thanks
jmiles
Posts: 19
Joined: Mon Oct 23, 2006 11:07 pm

Post by jmiles »

never mind, I got it figured out...i was getting a new set of linking errors and didn't read them closely enough to realize that they were seperate from the ITraingleRenderer2 issues :oops:
Post Reply