visual studio 2008 not compiling..

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
aoos
Posts: 5
Joined: Sat Oct 06, 2007 3:08 pm

visual studio 2008 not compiling..

Post by aoos »

hi guys, i have downloaded visual studio 2008 express and i have problem bulding projects using irrlicht. when i start a project and include the irrlicht header i get the error that the irrlicht header cannot be finded althougt i have included the the header and the lib (using tools -> options -> projects-> vc++ directories->include files->C:\irrlicht-1.4\bin\Win32-VisualStudio and library files ->C:\irrlicht-1.4\lib\Win32-visualstudio). the funny is that when i open the examples project using vc 2008 it convertes them and build them fine and run fine , when im trying to built my own project then i have problem. can anyone help? thanks!
Yustme
Posts: 107
Joined: Sat Dec 01, 2007 10:50 pm

Post by Yustme »

Hi aoos,

All the header files of irrlicht are located in this directory:

C:\irrlicht-1.4\include

So you have to add this directory in your options too.

This is how you add the directory in your IDE:

Project -> properties -> C/C++ -> General -> Additional Include Directories

Here you add the path:

C:\irrlicht-1.4\include

That's it.
aoos
Posts: 5
Joined: Sat Oct 06, 2007 3:08 pm

Post by aoos »

WOW! what a fast reply! :D yes u were right, i was careless. everything seems to function properly now! thanks!
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

And the examples works because they look for the Include directory of the SDK, if you play with the project options you'll see that.
Under C/C++ -> General -> Additional Include Directories I think..
Oh yes. Look it says "..\..\include".
That's why it compiled without the default search libraries being set right.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
ibax
Posts: 193
Joined: Thu Jun 21, 2007 8:56 am
Location: hungary
Contact:

Post by ibax »

hi
I read all the messages, but I have still a problem, with compiling...

some of the errors I got:

Code: Select all

Compiling...
main.cpp
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\menu.h(16) : error C2871: 'audio' : a namespace with this name does not exist
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\menu.h(47) : error C2143: syntax error : missing ';' before '*'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\menu.h(47) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\menu.h(47) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\menu.h(47) : error C3861: 'createIrrKlangDevice': identifier not found
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\menu.h(252) : error C2227: left of '->play2D' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\menu.h(269) : error C2227: left of '->play2D' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\exercise1.h(17) : error C2871: 'audio' : a namespace with this name does not exist
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(7) : error C2871: 'audio' : a namespace with this name does not exist
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(12) : error C2143: syntax error : missing ';' before '*'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(12) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(12) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(143) : error C2297: '*' : illegal, right operand has type 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(143) : error C3861: 'createIrrKlangDevice': identifier not found
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(150) : error C2227: left of '->play2D' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(208) : error C2297: '*' : illegal, right operand has type 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(208) : error C3861: 'createIrrKlangDevice': identifier not found
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(209) : error C2227: left of '->play2D' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(220) : error C2297: '*' : illegal, right operand has type 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(220) : error C3861: 'createIrrKlangDevice': identifier not found
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(221) : error C2227: left of '->play2D' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(316) : error C2297: '*' : illegal, right operand has type 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(316) : error C3861: 'createIrrKlangDevice': identifier not found
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(317) : error C2227: left of '->play2D' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(328) : error C2297: '*' : illegal, right operand has type 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(328) : error C3861: 'createIrrKlangDevice': identifier not found
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(329) : error C2227: left of '->play2D' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(351) : error C2227: left of '->drop' must point to class/struct/union/generic type
        type is 'int *'
c:\11 - diploma\2007_2008_2\temp\irrlicht\irrlicht\eventreceiver.h(361) : error C2227: left of '->drop' must point to class/struct/union/generic type
        type is 'int *'
Tools->Options->Projects and solutions->VC++ Directories->Include files:
...\irrlicht-1.4\bin\Win32-VisualStudio, ...\irrKlang-1.0.4\include, ...irrlicht-1.4\include

Tools->Options->Projects and solutions->VC++ Directories->Library files:
...\irrlicht-1.4\lib\Win32-visualstudio, ...\irrKlang-1.0.4\lib\Win32-visualStudio

Project->Properties->(Configuration: Active(Debug))->Configuration properties->C/C++->General->Addtional include directories->
...\irrlicht-1.4\include, ...\irrKlang-1.0.4\include

Project->Properties->(Configuration: Active(Debug))->Configuration properties->Linker->Additional library directories->
...\irrlicht\irrlicht-1.4\lib\Win32-visualstudio, ...\irrKlang-1.0.4\lib\Win32-visualStudio

Project->Properties->(Configuration: Active(Debug))->Configuration properties->Linker->Input->Additional dependencies->
IRRKLANG.LIB; IRRLICHT.LIB


Can somebody help me pls??
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

the first)
if you specifying something in Tools->Options->Projects and solutions , than it will work by default for all solutions and you do not need to specify it on the project-config level ( like you doing at Project->Properties ).

the second)
you have got all "C" errors ( means "compiler" ), so the problem in the paths to your header files. If you cannot ( or having problems ) with locating files using relation-paths -- use absolute paths! So do not use ..\irrlicht-1.4\include, but use C:\irrlicht-1.4\include

the third)
to VC++ Directories->Include files add C:\irrlicht-1.4\include
to VC++ Directories->Library files add C:\irrlicht-1.4\lib\Win32-visualstudio
((if you using IrrKLang -- do the same moves related to C:\irrklang\))
ibax
Posts: 193
Joined: Thu Jun 21, 2007 8:56 am
Location: hungary
Contact:

Post by ibax »

oh, sorry, I'm using absolute paths, but those are a little bit long, this is the reason, why I changed it to "...".

Code: Select all

C:\11 - Diploma\2007_2008_2\temp\irrlicht\irrKlang-1.0.4\include
C:\11 - Diploma\2007_2008_2\temp\irrlicht\irrlicht-1.4\bin\Win32-VisualStudio

I have all the paths in this form.

I will try, what U wrote, thanx for it!!!!
Post Reply