About demo file

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
Mircea Popescu
Posts: 26
Joined: Sat Jan 02, 2010 12:48 pm

About demo file

Post by Mircea Popescu »

Whats

Code: Select all

#pragma comment(lib, "Irrlicht.lib")
supposed to accomplish in the main.cpp in the demo package ?
frr171
Posts: 4
Joined: Sat Jan 02, 2010 10:17 pm
Location: Chandler Arizona
Contact:

Re: demo file

Post by frr171 »

#pragma comment is a VC++ compiler directive used to specify linker options.

Basically, including that line of code is equivalent to adding all of the Irrlicht code files to your project. The .lib is the precompiled version.
Mircea Popescu
Posts: 26
Joined: Sat Jan 02, 2010 12:48 pm

Post by Mircea Popescu »

Ya, but if you're trying to compile it with anything OTHER than vc it would cause the resulting program to fail (through having linked the wrong libraries).

So basically, all the problems people with dev-cpp have been having (I've seen a few people complaining they can't compile the examples on the forum) could really be traced back to this directive ?
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Not all of them, but probably most of the linker error issues.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The pragma is simply ignored by other compilers, the errors people have with other IDEs are simply due to wrong usage of the tools :!:
Post Reply