Unable to compile.

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
Airslash
Posts: 17
Joined: Wed Jan 16, 2008 2:35 pm

Unable to compile.

Post by Airslash »

Hello,

I'm currently trying to get the source code of irrlicht compiled on a windows system. I'm using Eclipse with the CDT C++ editor and minGW compiler to compile the entire project. At the moment I'm getting several errors, and everytime I rebuild i'm getting different errors.

Also I keep getting issues with the X11 files and the MAC files although I have disaibled them by configuring the configheader of irrlicht.

Some of the errors
============
1. dllimport error, no idea why

Code: Select all

Severity and Description	Path	Resource	Location	Creation Time	Id
function `irr::io::IrrXMLReaderUTF32* irr::io::createIrrXMLReaderUTF32(irr::io::IFileReadCallBack*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 141	1200493438375	22830
function `irr::io::IrrXMLReaderUTF32* irr::io::createIrrXMLReaderUTF32(FILE*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 134	1200493438375	22829
function `irr::io::IrrXMLReaderUTF32* irr::io::createIrrXMLReaderUTF32(const char*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 127	1200493438375	22828
function `irr::io::IrrXMLReaderUTF16* irr::io::createIrrXMLReaderUTF16(irr::io::IFileReadCallBack*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 120	1200493438375	22827
function `irr::io::IrrXMLReaderUTF16* irr::io::createIrrXMLReaderUTF16(FILE*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 113	1200493438375	22826
function `irr::io::IrrXMLReaderUTF16* irr::io::createIrrXMLReaderUTF16(const char*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 106	1200493438375	22825
function `irr::io::IrrXMLReader* irr::io::createIrrXMLReader(irr::io::IFileReadCallBack*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 99	1200493438375	22824
function `irr::io::IrrXMLReader* irr::io::createIrrXMLReader(FILE*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 92	1200493438375	22823
function `irr::io::IrrXMLReader* irr::io::createIrrXMLReader(const char*)' definition is marked dllimport.	daydream/render core	irrXML.cpp	line 85	1200493438375	22822
2. the X files he needs, although they shouldn'tbe required

Code: Select all

Severity and Description	Path	Resource	Location	Creation Time	Id
X11/Xutil.h: No such file or directory	daydream/render core/libpng/contrib/gregbook	rpng2-x.c	line 70	1200494418593	23282
X11/Xos.h: No such file or directory	daydream/render core/libpng/contrib/gregbook	rpng2-x.c	line 71	1200494418593	23283
X11/Xlib.h: No such file or directory	daydream/render core/libpng/contrib/gregbook	rpng2-x.c	line 69	1200494418593	23281
X11/keysym.h: No such file or directory	daydream/render core/libpng/contrib/gregbook	rpng2-x.c	line 72	1200494418593	23284
3. Errors about undefined flags, although all header links & includes have been checked.

Code: Select all

Severity and Description	Path	Resource	Location	Creation Time	Id
`PNG_SELECT_WRITE' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 75	1200494503140	23429
`PNG_SELECT_WRITE' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 272	1200494503140	23443
`PNG_SELECT_READ' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 75	1200494503140	23428
`PNG_SELECT_READ' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 272	1200494503140	23442
`PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 282	1200494503140	23445
`PNG_ASM_FLAG_MMX_SUPPORT_COMPILED' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 274	1200494503140	23444
`PNG_ASM_FLAG_MMX_READ_INTERLACE' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 104	1200494503140	23435
`PNG_ASM_FLAG_MMX_READ_INTERLACE' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 262	1200494503140	23441
`PNG_ASM_FLAG_MMX_READ_FILTER_UP' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 90	1200494503140	23431
`PNG_ASM_FLAG_MMX_READ_FILTER_UP' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 255	1200494503140	23437
`PNG_ASM_FLAG_MMX_READ_FILTER_SUB' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 88	1200494503140	23430
`PNG_ASM_FLAG_MMX_READ_FILTER_SUB' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 255	1200494503140	23436
`PNG_ASM_FLAG_MMX_READ_FILTER_PAETH' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 94	1200494503140	23433
`PNG_ASM_FLAG_MMX_READ_FILTER_PAETH' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 255	1200494503140	23439
`PNG_ASM_FLAG_MMX_READ_FILTER_AVG' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 92	1200494503140	23432
`PNG_ASM_FLAG_MMX_READ_FILTER_AVG' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 255	1200494503140	23438
`PNG_ASM_FLAG_MMX_READ_COMBINE_ROW' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 100	1200494503140	23434
`PNG_ASM_FLAG_MMX_READ_COMBINE_ROW' undeclared (first use in this function)	daydream/render core/libpng/contrib/gregbook	readpng2.c	line 260	1200494503140	23440
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Try removing the files it complains about from your project. You don't need the Linux or OSX stuff, and not all of the PNG files are required.
You could look for hints in the other Windows project files, they are all plain text- msvc and codeblocks are xml, dev-cpp is an ini file.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Swarmer
Posts: 100
Joined: Mon Apr 16, 2007 7:23 am

Post by Swarmer »

I haven't used Eclipse much, but make sure the library and include paths are set correctly in Eclipse. I usually forget to update the directory search locations in Visual Studio when a new version of Irrlicht comes out or when I move my files around; I get similar errors like yours when that happens.
Airslash
Posts: 17
Joined: Wed Jan 16, 2008 2:35 pm

Post by Airslash »

thanks for the pointer swarmer, I will definitly check those settings tommorow
Airslash
Posts: 17
Joined: Wed Jan 16, 2008 2:35 pm

Post by Airslash »

Ok further update.

At the moment I've cleaned out all the code and files that we definitly wouldn't be needing in our project. This would be directX, and MAC specific code. The attempt is to make a pure openGL comilation of it, but I'm still getting the 'marked as dllimport' errors on a few irrlicht_api calls.

Any ideas as to what might be causing those?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

In order to compile under win32 you have to make some defines:
-DIRRLICHT_EXPORTS=1 -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
This should configure the build process in a way that works with mingw.
Post Reply