Compiling in MS Visual C++ Express 2008

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
laci37
Posts: 6
Joined: Mon Jan 19, 2009 7:12 pm

Compiling in MS Visual C++ Express 2008

Post by laci37 »

Hi!
I am an absolute newbie, I am just learning the C++ language(of course I have programming experience but in VB.NET). I tried to compile a demo which I downloaded with the engine, but it did not want to compile it, header files were missing. I replaced them, but the it said that there are over 100 errors in the code. Can anybody help? I'm sorry if this question has been asked somewhere else too.
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

Did you setup the correct path for the header files, you can do in the options menu from the editor
radical-dev
Posts: 45
Joined: Thu Apr 24, 2008 7:54 pm
Location: Wickede, Germany

Post by radical-dev »

First of all u should know how to use the tools u're working with - then learn the basics of C++ like classes/namespaces/pointers - and then could try to do something with Irrlicht.

It's not recommended to drive a car without knowing what the steering wheel is for :wink: .

Just my 5 censt :D
zillion42
Posts: 324
Joined: Wed Aug 29, 2007 12:32 am
Location: Hamburg, Germany

Post by zillion42 »

^ on the other hand, if you never start you never get started...

Tutorial 1 Hello World shows how to set up a very old of version of visual studio and even if it looks different today the basics are the same. Give visual studio the path to the includes and libraries... The turorials are a recommendable way to start anyway, so maybe look there.
abhishekdey1985
Posts: 102
Joined: Sat Jan 17, 2009 4:33 am
Location: Pune
Contact:

Post by abhishekdey1985 »

i'm using MinGW 5.1.4 as my developemnt environment. When i try to compile the source code it gives me crtdbg.h not found error. I then modified the source code of irrlicht.cpp to skip the check but only a libitrrlicht.a file is produced. I need a DLL file which should hav DX8, 9 , OPENGL, and other engine support in it. the DLL which comes for win32 GCC supports only OpenGL!
-I then tried using the dlltool of MinGW to produce a dll using a .def file - one of the output file of source code compilation. But i get DLL refernce error.
-I even tried using reimp to convert irrlicht.lib to libIrrlicht.a , but again get the same entry point error.

Can any one help me with the compilation problem?
SSG
Posts: 33
Joined: Sun Jan 11, 2009 1:16 pm

Post by SSG »

Can any one help me with the compilation problem?
Yes.
abhishekdey1985
Posts: 102
Joined: Sat Jan 17, 2009 4:33 am
Location: Pune
Contact:

Post by abhishekdey1985 »

Yes i tried compiling the same in MSVS but MinGW doesnt support DLL's compiled from MSVS and .lib files. I need help regarding the compilation Under MinGW?
Jiang
Posts: 77
Joined: Tue Feb 20, 2007 11:03 am

Post by Jiang »

abhishekdey1985 wrote:i'm using MinGW 5.1.4 as my developemnt environment. When i try to compile the source code it gives me crtdbg.h not found error.
You need macros, like __GNUWIN32__, for your MingW gcc compiler.
abhishekdey1985 wrote: I then modified the source code of irrlicht.cpp to skip the check but only a libitrrlicht.a file is produced.

If I were you, I would not do that. Sooner or later you will find conflict problems or something like that.

abhishekdey1985 wrote: I need a DLL file which should hav DX8, 9 , OPENGL, and other engine support in it. the DLL which comes for win32 GCC supports only OpenGL!
-I then tried using the dlltool of MinGW to produce a dll using a .def file - one of the output file of source code compilation. But i get DLL refernce error.
-I even tried using reimp to convert irrlicht.lib to libIrrlicht.a , but again get the same entry point error.

Can any one help me with the compilation problem?
I wrote a small tool called irrBuild, it can build DLL using Code::Blocks with MingW gcc compiler. If you do not want to use any IDE, I think you can export necessary Makefiles from Code::Blocks. To use that tool, just double-click the script/bat file and you can build all the library, examples and testsuite with different configuration (static/shared, release/debug) using the generated solution/workspace/makefile.

Download it here. And search this forum you will find an more detailed introduction in my mind.


Hope you can save your time for other interesting/important things. :)

Regards,

Jiang
abhishekdey1985
Posts: 102
Joined: Sat Jan 17, 2009 4:33 am
Location: Pune
Contact:

Post by abhishekdey1985 »

i'l try using irrbuild. Thanx for the help :D
abhishekdey1985
Posts: 102
Joined: Sat Jan 17, 2009 4:33 am
Location: Pune
Contact:

Post by abhishekdey1985 »

Hey it worked for me..Thnx PAL!! :D
Post Reply