Irrlicht Beginner - Help Requested


Bartz

Still Fresh
Joined
Aug 3, 2007
Messages
3
Age
31
Location
Netherlands
Website
pandora.decrescentmoons.com
Hello everyone,
I'm interested in developing for the Pandora, and would like to start out using Irrlicht.
I've never used Irrlicht before, though I have worked with several other engines.

I'm using Visual Studio Pro 9 for Irrlicht, but unfortunately the engine won't really work for me.

I've tried several times to work through the tutorial section, but I can't seem to get past Hello World since the build keeps on returing the following issues:

Code:
//With these lines enabled

#pragma comment(lib, "Irrlicht.lib")
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif

//I get this:
//1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

Code:
//Without the lines above enabled, the build returns this:

1>HARDWARE.obj : error LNK2019: unresolved external symbol __imp__createDevice referenced in function _wmain

Can anyone determine for me how to fix this?

I have specified the additional include and additional library directories in the project's properties, and included irrlicht.dll in my project's folder.

Maybe I'm missing out on something I need to do in order to let this work on the Pandora, too, so let me know if there is anything I need to keep in mind if developing for it(I'm using Windows 7, by the way).

Furthermore I'd like any help I can get, so if you have any tips/resources/anything else, please let me know!

Thanks in advance,
Sjors
 
Jan-Nik said:
Try to remove /ENTRY:mainCRTStartup or even the whole line.

Hi Jan-Nik, thanks for your response.
Unfortunately removing /ENTRY:mainCRTStartup results in these errors:

Code:
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>D:\C++\HOMEBREW\PANDORA\IRRLICHT\PROJECTS\HARDWARE\Debug\HARDWARE.exe : fatal error LNK1120: 1 unresolved externals
I will consult the Irrlicht forums for furder instructions, and let you know as soon as I have solved the problem.

Thank you very much!
 
Last edited by a moderator:
This looks suspiciously like a problem between the visual studio librarys.
In visual studio go into project properties and make sure that 'Configuration Type' is set to .exe under the General tab.
Go to the C/C++ ->Code Generation tab and make sure you 'Runtime Library' is set correctly (probably multithreaded debug if your doing a debug build)

Hope ive remembered it correctly :)
 
I have also done some tests with Irrlicht and I didn't have any problems... This is the way I do it:

Install Irrlicht, make a new directory (in the Irrlicht folder) called "Projects" (for example) and then in there I make my project with Visual Studio 2008. I choose Win32 Console Application (or Win32, doesn't make a difference it seems) and make it an empty project and then without doing any settings I can just take one of the example main.cpp files, build the projects and it works.

Just checked the project properties and now I remember I did change some things in the project properties this is what I have:

...\Irrlicht-1.7.1\include added to the -Include Files-
...\Irrlicht-1.7.1\lib\Win32-visualstudio added to the -Library Files-
...\Irrlicht-1.7.1\bin\Win32-visualstudio added to the -Source Files-

I don't think this will help as I can't seem to get the error you get when deleting some of the settings... Though I hope you'll get it working, good luck!
 
Thanks for your replies guys.
I've checked everything you said,
but it all seems to have been configured. Maybe it's because the tutorial is outdated?
I'll try to find another source for learning then :).

Thanks very much, I'll let you know!
 
Bartz said:
Thanks for your replies guys.
I've checked everything you said,
but it all seems to have been configured. Maybe it's because the tutorial is outdated?
I'll try to find another source for learning then :) .

Thanks very much, I'll let you know!

Just found out a second ago and registered to tell you here.
You have to add the following after the includes. Then I had a Problem with a manifest not beeing written to the .exe-File. So I just deleted the cleaned and rebuilt.

#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif

Hope this helps,
Sebastian
 
Last edited by a moderator:
Back
Top