hello world - tutorial 1 problems

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
grundy
Posts: 4
Joined: Thu Jun 22, 2006 11:36 pm

hello world - tutorial 1 problems

Post by grundy »

in the entire tutorial it doesnt tell you what you need to have in the project or where to type in the code so i just made a new project with a blank cpp file and typed all the code exactly as it shows and added the include directory and the library director under tools -> options -> Projects -> VC++ Directories

when i compile i get this
error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
fatal error LNK1120: 1 unresolved externals
then i tried to build the project Irrlicht.NET.sln in the irrlich-1.0\source\source.zip\Irrlicht.NET folder and when i try to build that without making any changes to the code at all i get 29 errors saying
fatal error C1083: Cannot open include file: '..\\irrlicht\\include\\irrlicht.h': No such file or directory
so i change that line 29 times to just #include "irrlicht.h" and those 29 errors are gone but then i get 10 more of the same errors and about 500 errors saying
error C3280: 'Irrlicht::(insert various namespaces here)::(insert various class names here)::(inser various class member functions here)' : a member-function of a managed type cannot be compiled as an unmanaged function.

so im guessing thats not what i have to use for the tutorial 1, maybe im wrong but im giving the author a little more credit than that. so can someone tell me what files i need to make tutorial 1 work
sRc
Posts: 431
Joined: Thu Jul 28, 2005 1:44 am
Location: Salt Lake City, Utah
Contact:

Post by sRc »

for your first problem you need to change it from a Win32 app to a console app (/subsystem:console in the project settings). for your second problem.... uhh... you just dug yourself deeper there :?
The Bard sRc

Blog | Twitter
gfxstyler
Posts: 222
Joined: Tue Apr 18, 2006 11:47 pm

Post by gfxstyler »

i got a couple of questions:

1. can vc++ do c# stuff?
2. do you know c++ or c# ?

see you :)
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Ohhh, I gues he knoew neither one nor another... :shock:

You sould setup your compiler (ide) correctly !!!
Just copy and paste code into a blanc project doesn't work...
Your compiler needs to know where the includes can be found and what lib to link against...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
grundy
Posts: 4
Joined: Thu Jun 22, 2006 11:36 pm

Post by grundy »

Acki wrote:Ohhh, I gues he knoew neither one nor another... :shock:

You sould setup your compiler (ide) correctly !!!
Just copy and paste code into a blanc project doesn't work...
Your compiler needs to know where the includes can be found and what lib to link against...
oh, well thanks for not reading, i already said i did that.
adam23
Posts: 14
Joined: Fri Jun 16, 2006 6:37 pm
Contact:

Post by adam23 »

I'm just taking a stab at helping you. I think your building the wrong project. You shouldn't be building the .Net project.

Go to examples/01.HelloWorld and open one of the solution files. The way it sounds you setup everything correctly, just make sure you have your lib directory, and include directory set for both release and debug mode. Your first problem is pretty simple just make sure it says this WIN32,_DEBUG,_CONSOLE under properties C/C++ Preprocessor/ Preprocessor definitions and this WIN32,NDEBUG,_CONSOLE in the same location when you switch to release mode. Maybe I didn't see it, but from the way it sounds you must be using Visual Studio .Net by the way you set your directories.
grundy
Posts: 4
Joined: Thu Jun 22, 2006 11:36 pm

Post by grundy »

i changed it to console application and it compiles but now when i try to run it i get this error saying that it cant find Irrlicht.dll

i am using Visual Studio .NET 2003

i DID include the library directory under tools -> options -> prjects -> vc++ directories -> directories for library files
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

This should be definitely in the tutorials, but should be common folklore under windows users as well: The .dll file is required to be present either in the current directory or somewhere in the %PATH%. So either run the example from some directory where Irrlicht.dll is in, or put Irrlicht.dll to C:\WINDOWS\SYSTEM or similar locations.
grundy
Posts: 4
Joined: Thu Jun 22, 2006 11:36 pm

Post by grundy »

ok now its telling me:
hello.exe - Entry Point Not Found

The procedure entry point
?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PBD@Z could not be located in the dynamic link library Irrlicht.dll.
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

The search feature is really quite useful you know:

http://irrlicht.sourceforge.net/phpBB2/ ... ntry+point
Post Reply