MSVC++ Express and Hello World error?

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
random
Posts: 158
Joined: Wed Aug 11, 2010 6:01 am

MSVC++ Express and Hello World error?

Post by random »

Hello i am new to irrlicht and also msvc++ (2010) express

when i copy paste the hello world i get this error output for debugging
1>------ Erstellen gestartet: Projekt: irrlicht ide 3, Konfiguration: Debug Win32 ------
1> main.cpp
1>c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irrlicht ide 3\irrlicht ide 3\main.h(21): error C2664: 'irr::createDevice': Konvertierung des Parameters 2 von 'irr::core::dimension2d<T>' in 'const irr::core::dimension2d<T> &' nicht möglich
1> with
1> [
1> T=irr::s32
1> ]
1> and
1> [
1> T=irr::u32
1> ]
1> Ursache: Konvertierung von 'irr::core::dimension2d<T>' in 'const irr::core::dimension2d<T>' nicht möglich
1> with
1> [
1> T=irr::s32
1> ]
1> and
1> [
1> T=irr::u32
1> ]
1> Kein benutzerdefinierter Konvertierungsoperator verfügbar, der diese Konvertierung durchführen kann, oder der Operator kann nicht aufgerufen werden
1>c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irrlicht ide 3\irrlicht ide 3\main.cpp(4): error C2653: 'main': Keine Klasse oder Namespace
1>c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irrlicht ide 3\irrlicht ide 3\main.cpp(5): error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.
1>c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irrlicht ide 3\irrlicht ide 3\main.cpp(5): error C2084: Funktion 'int main(void)' hat bereits einen Funktionsrumpf
1> c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irrlicht ide 3\irrlicht ide 3\main.h(13): Siehe vorherige Definition von 'main'
1>c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irrlicht ide 3\irrlicht ide 3\main.cpp(9): error C2653: 'main': Keine Klasse oder Namespace
1>c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irrlicht ide 3\irrlicht ide 3\main.cpp(9): fatal error C1903: Weiterverarbeitung nach vorherigem Fehler nicht möglich; Kompilierung wird abgebrochen.
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
i guess i made some mistake when choosing what kind of class i will use...

i know where to set includes and library for project but

1) what kind of project must i choose ?
2) when i tried empty project i tried to make a class called main and copied the source in there, was that wrong?

any help would be nice

greetz
huoda
Posts: 12
Joined: Sun Aug 08, 2010 5:06 pm
Location: Canelones, Uruguay

Post by huoda »

As ever, is a 'M' i 'S' take hahahahahaahaha, I recommend you use Code::Blocks, is simple and the Irrlicht API works very well in it. I wanted to start with Devc++ but is old and does not support hehe. Use C:: B, is better.
huoda
Posts: 12
Joined: Sun Aug 08, 2010 5:06 pm
Location: Canelones, Uruguay

Post by huoda »

ah, sorry, and try empty project next time. However, you can search a simple C++ tutorial first.

And WELLCOME TO IRRLICHT!!! :D :D :D :D
You found a very powerful 3D engine, trust me, I already try others.
random
Posts: 158
Joined: Wed Aug 11, 2010 6:01 am

Post by random »

Well i choosed an empty project :)

But ok i will do it once again and write down my Steps

1) I made an mew Empty Project (I called it Irr6)
2) I am now in a view with a "project map explorer" to the left hand (i try to translate the german words to english)
3) In the "project map explorer" i make an rightclick on the Irr6 Project folder and choose "settings" and in "settings" i choose "configuration settings" and than "vc++ folders".
4) now on the right hand of the "settings" popup window i can add irrlichts"include" folder into "include folder" (german: Includeverzeichnisse) what is here the 2nd point from the top and Irrlichts "lib/visual studio 32 bit" folder into "library folders" (German: Bibliotheksverzeichnisse) which is the 4th point from top
( I needed to do steps 3+4 that way because MS VC++ 2010 Express does not allow to set this into Extras->options like described in the Hello world tutorial )
5) no i can do what i want from adding a class or even make an empty cpp

this will be the output when i hit the debug button:
1>------ Erstellen gestartet: Projekt: Irr6, Konfiguration: Debug Win32 ------
1> main.cpp
1>c:\dokumente und einstellungen\administrator.shockwave\eigene dateien\visual studio 2010\projects\irr6\irr6\main.cpp(21): error C2664: 'irr::createDevice': Konvertierung des Parameters 2 von 'irr::core::dimension2d<T>' in 'const irr::core::dimension2d<T> &' nicht möglich
1> with
1> [
1> T=irr::s32
1> ]
1> and
1> [
1> T=irr::u32
1> ]
1> Ursache: Konvertierung von 'irr::core::dimension2d<T>' in 'const irr::core::dimension2d<T>' nicht möglich
1> with
1> [
1> T=irr::s32
1> ]
1> and
1> [
1> T=irr::u32
1> ]
1> Kein benutzerdefinierter Konvertierungsoperator verfügbar, der diese Konvertierung durchführen kann, oder der Operator kann nicht aufgerufen werden
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
this part here
Kein benutzerdefinierter Konvertierungsoperator verfügbar, der diese Konvertierung durchführen kann, oder der Operator kann nicht aufgerufen werden
means translated >
No user defined converting operator available which is able to handle this converting or the operator can not be called.
can someone give me a hint what i did wrong please :)

greeetz
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Sorry, we found no time yet to support VS 2010. I hope we find time for it before Irrlicht 1.8.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

That's not to say VS 2010 doesn't work with Irrlicht. I've been using the two in combination for months with no problems when I create a project from scratch.

Those errors sound like something caused by your code, not Irrlicht or MSVC. Do you want to share your code?
random
Posts: 158
Joined: Wed Aug 11, 2010 6:01 am

Post by random »

have a look at here:

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=39538

a error wich sounds like the same as in MS VC++

there i used the original download of code::blocks 10.05 with minGW and the original download of Irrlicht 1.71 :)

greetz:)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The compile problem is due to using outdated code. Simply make the window dimensions a u32 struct, instead of s32 as you're using. This has changed in Irrlicht 1.6 or so.
Post Reply