Page 1 of 1

hello world - tutorial 1 problems

Posted: Fri Jun 23, 2006 12:03 am
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

Posted: Fri Jun 23, 2006 12:08 am
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 :?

Posted: Fri Jun 23, 2006 12:12 am
by gfxstyler
i got a couple of questions:

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

see you :)

Posted: Fri Jun 23, 2006 12:30 am
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...

Posted: Fri Jun 23, 2006 2:15 am
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.

Posted: Fri Jun 23, 2006 3:13 am
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.

Posted: Fri Jun 23, 2006 4:51 pm
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

Posted: Fri Jun 23, 2006 5:35 pm
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.

Posted: Fri Jun 23, 2006 6:19 pm
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.

Posted: Fri Jun 23, 2006 6:26 pm
by stodge
The search feature is really quite useful you know:

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