XML call not compiling on 1.4.1 release

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
Carnafex
Posts: 15
Joined: Wed Sep 05, 2007 1:32 am
Location: Sydney, Australia

XML call not compiling on 1.4.1 release

Post by Carnafex »

Heya,

I've just recently upgraded to the latest release of Irricht (not SVN, just 1.4.1 from the site), and I can't seem to get my code compiling anymore. The method below worked and compiled using 1.4, but doesn't compile using 1.4.1.

Some background information:
* I'm using MSVC++ Express 2005 to compile the project
* I'm linking to the lib\win32-visualstudio\Irrlicht.lib

Code: Select all

IrrXMLReader* xml = createIrrXMLReader("config.xml");
Compile results:

Code: Select all

Linking...
Irrlicht.lib(Irrlicht.dll) : error LNK2005: "class irr::io::IIrrXMLReader<char,class irr::io::IXMLBase> * __cdecl irr::io::createIrrXMLReader(char const *)" (?createIrrXMLReader@io@irr@@YAPAV?$IIrrXMLReader@DVIXMLBase@io@irr@@@12@PBD@Z) already defined in irrXML.obj
C:\Documents and Settings\Jason\My Documents\Visual Studio 2005\Projects\Irrlich Test\Debug\4X.exe : fatal error LNK1169: one or more multiply defined symbols found
I'm really not sure why this is happening or how to fix it, but if anyone has any good ideas, I would really appreciate it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Looks like you're linking against libIrrlicht and irrXML.o at the same time.
Carnafex
Posts: 15
Joined: Wed Sep 05, 2007 1:32 am
Location: Sydney, Australia

Post by Carnafex »

Thanks for the quick reply Hybrid, much appreciated, it pointed me in the right direction.

Basically I had an old irrXML.cpp accidentally included in my code, which was causing the error :oops:. Clearing it out fixed the problem straight away!

Thanks heaps.
Post Reply