MinGW woes

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
gavicus
Posts: 16
Joined: Fri Aug 25, 2006 2:19 pm

MinGW woes

Post by gavicus »

I'm getting a load of compile errors when trying to compile Irrlicht with MinGW Developer Studio 2.05 for the first time. I've trimmed my code down to bare bones...

#include <irrlicht.h>
int main()
{
return 0;
}

...and with just that, I get 7 errors and 59 warnings. It looks like its all about the #include<irrlicht.h> line. I won't include the whole list of entries, but here's an example:

In file included from ..\..\..\irrlicht-1.0\include\irrlicht.h:36,
from main.cpp:1:
..\..\..\irrlicht-1.0\include\SLight.h: In constructor `irr::video::SLight::SLight()':
..\..\..\irrlicht-1.0\include\SLight.h:57: warning: `irr::video::SLight::Type' will be initialized after
..\..\..\irrlicht-1.0\include\SLight.h:37: warning: `irr::video::SColorf irr::video::SLight::AmbientColor'
..\..\..\irrlicht-1.0\include\SLight.h:34: warning: when initialized here

I'm not sure what's going on here. Has anyone gotten the same problems?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to add -Wno-reorder to the compiler flags to suppress these warnings. They don't really matter so they are not fixed.
gavicus
Posts: 16
Joined: Fri Aug 25, 2006 2:19 pm

Post by gavicus »

Ok, this gets me down to one error message Now when I try the line:

IrrlichtDevice *device = createDevice(driverType, core::dimension2d<s32>(640, 480));

I get the error:

C:\cpp\test\main.cpp:36: undefined reference to `_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'

I'm sure this is just IDE setup, and I'm unfamiliar with MinGW. Any ideas?
KillerXX7
Posts: 22
Joined: Sat Oct 07, 2006 4:50 pm
Location: Russian Federation
Contact:

Post by KillerXX7 »

You have forgotten to add irrlicht.lib ?

#pragma comment(lib,"irrlicht.lib")
Think Fast, Act Right... OR Be Dead :)
gavicus
Posts: 16
Joined: Fri Aug 25, 2006 2:19 pm

Post by gavicus »

Nope, I have the

#pragma comment(lib, "Irrlicht.lib")

line coded in. The above code is a result of gradual trimming down until practically nothing is left. Before I removed the pragma comment, I already had the error.

At this point, it compiles fine until I try the createDevice command.

Anyway, its enfuriating because I have done all this with visual studio, but don't have access to it anymore.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

some pragma's are compiler specific, I believe. Does MinGW support that?

If it does support it, does the linker have the path to the irrlicht lib?
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

gavicus wrote: Anyway, its enfuriating because I have done all this with visual studio, but don't have access to it anymore.
I don't know if this is any help, but have you tried Visual Studio 2005 Express? It's free, I believe.
Post Reply