1.5 Win32/gcc build error

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

bad news... Irrlicht 1.5 from the SVN doesn't compile well in win32-gcc. I thought at first it was because i didn't have the library, so i run the make on its own, outside DevCPP, and even tried to used the makefile for Linux, in both sides, and it gave me this error:

Code: Select all

g++ -Wall -pipe -g -D_DEBUG -I../../include -Izlib -Ijpeglib -Ilibpng -DIRRLICHT
_EXPORTS=1 -DIRR_COMPILE_WITH_DX9_DEV_PACK -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WI
NDOWS -D_MBCS -D_USRDLL  -c -o Irrlicht.o Irrlicht.cpp
Irrlicht.cpp:44: error: external linkage required for symbol 'irr::core::Identit
yMatrix' because of 'dllexport' attribute.
make: *** [Irrlicht.o] Error 1
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
zeroZshadow
Posts: 43
Joined: Mon Dec 01, 2008 6:35 pm

Post by zeroZshadow »

same here, both on devcpp and code::blocks
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Thanks for the report. It looks like I was a bit too keen with the exporting. SVN 1902 might fix this, but I don't have a Win32 gcc compiler, so I can't be sure. If it doesn't, then I'll revert the whole change that caused this. Sorry for the inconvenience.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

rogerborg wrote:SVN 1902 might fix this, but I don't have a Win32 gcc compiler, so I can't be sure.
what is the fix, so we can test it... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

I'll update and test whenever it is availbale. Thanks!
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Acki wrote:
rogerborg wrote:SVN 1902 might fix this, but I don't have a Win32 gcc compiler, so I can't be sure.
what is the fix, so we can test it... ;)
He explicitly states that SVN 1902 is the fix :roll:
zeroZshadow
Posts: 43
Joined: Mon Dec 01, 2008 6:35 pm

Post by zeroZshadow »

just checked it on rev 1902 with devc++
still the same error about IdentityMatrix

Yup same with code::blocks

the whole buildlog:

Code: Select all

||=== Irrlicht, Release ===|
C:\consoledev\irrlicht-svn\source\Irrlicht\CImageLoaderJPG.cpp||In member function `virtual irr::video::IImage* irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':|
C:\consoledev\irrlicht-svn\source\Irrlicht\CImageLoaderJPG.cpp|139|warning: variable 'rowPtr' might be clobbered by `longjmp' or `vfork'|
C:\consoledev\irrlicht-svn\source\Irrlicht\CImageLoaderPNG.cpp||In member function `virtual irr::video::IImage* irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':|
C:\consoledev\irrlicht-svn\source\Irrlicht\CImageLoaderPNG.cpp|93|warning: variable 'image' might be clobbered by `longjmp' or `vfork'|
C:\consoledev\irrlicht-svn\source\Irrlicht\CImageLoaderPNG.cpp|95|warning: variable 'RowPointers' might be clobbered by `longjmp' or `vfork'|
C:\consoledev\irrlicht-svn\source\Irrlicht\COpenGLDriver.cpp||In member function `bool irr::video::COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters)':|
C:\consoledev\irrlicht-svn\source\Irrlicht\COpenGLDriver.cpp|72|warning: 'PixelFormat' might be used uninitialized in this function|
C:\consoledev\irrlicht-svn\source\Irrlicht\Irrlicht.cpp|44|error: external linkage required for symbol 'irr::core::IdentityMatrix' because of 'dllexport' attribute.|
||=== Build finished: 1 errors, 4 warnings ===|
Eigen
Competition winner
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia
Contact:

Post by Eigen »

I get the same error with DevCpp. Although the "'image' might be clobbered" warning has always been present.

Code: Select all

C:\irrlicht-1.5.beta\source\Irrlicht\COpenGLDriver.cpp In member function `bool irr::video::COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters)': 
72 C:\irrlicht-1.5.beta\source\Irrlicht\COpenGLDriver.cpp [Warning] 'PixelFormat' might be used uninitialized in this function
 C:\irrlicht-1.5.beta\source\Irrlicht\CImageLoaderPNG.cpp In member function `virtual irr::video::IImage* irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const': 
93 C:\irrlicht-1.5.beta\source\Irrlicht\CImageLoaderPNG.cpp [Warning] variable 'image' might be clobbered by `longjmp' or `vfork' 
44 C:\irrlicht-1.5.beta\source\Irrlicht\Irrlicht.cpp external linkage required for symbol 'irr::core::IdentityMatrix' because of 'dllexport' attribute.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

OK, sorry about this, and thanks for your continued patience. Since I can't test this, I've just removed the cause; it was one of those spur of the moment changes that we never really tested. :(

SVN 1905 should remove the issue completely. If not, then God help us. God help us all.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
zeroZshadow
Posts: 43
Joined: Mon Dec 01, 2008 6:35 pm

Post by zeroZshadow »

then i hope god is still on hold on your phone.

it didn't work.
wierd thing is, when i updated to rev 1905, no files where changed at all here
or do i have to recheckout ?
Eigen
Competition winner
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia
Contact:

Post by Eigen »

The SVN didn't work for me either. But changing

Code: Select all

namespace core
{
	IRRLICHT_API const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY);
}
to

Code: Select all

namespace core
{
	IRRLICHT_API extern const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY);
}
allowed me to compile the engine. It seems to work fine. I don't know if it's a correct solution or anything ..
zeroZshadow
Posts: 43
Joined: Mon Dec 01, 2008 6:35 pm

Post by zeroZshadow »

compiles here too with some errors

but suddenly my game is broken, so i'm reverting

stuff that breaks:

Code: Select all

WideString msg;
msg = nodeTarget->isVisible();
//widestring is just a stringw
the error on compiling is:

Code: Select all

no match for 'operator=' in 'msg = (*(((irr::scene::ISceneNode*)nodeTarget)->irr::scene::ISceneNode::_vptr$IAttributeExchangingObject + 56u))(((irr::scene::ISceneNode*)nodeTarget))' 

candidates are: irr::core::string<T, irr::core::irrAllocator<T> >& irr::core::string<T, TAlloc>::operator=(const irr::core::string<T, irr::core::irrAllocator<T> >&) [with T = wchar_t, TAlloc = irr::core::irrAllocator<wchar_t>] 
damn, and i was so hoping to use the new version =.=
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

integers require an explicit constructor call as of 1.5, so just add core::stringw(nodeTarget->isVisible())
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Oh splurge. I'm sorry, I'm talking about SVN 1905 on the 1.5 branch, not the trunk. All of our fixes are going on the 1.5 branch first.

On the 1.5 branch, I've removed that IRRLICHT_API completely now.

I should really just get myself a Win32 gcc, shouldn't I?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
MasterM
Posts: 128
Joined: Sat Oct 20, 2007 2:38 am
Location: netherlands antilles, Curacao

Post by MasterM »

I should really just get myself a Win32 gcc, shouldn't I?
It was a shock to hear that you did not have the most awesome compiler :o
C++ is not the Magdalena...it takes patience...shes like the well aged prostitute, it takes years to learn her tricks! she is cruel...laughs at you when you are naked...
Life of a programmer == Const abuse
Post Reply