Linker error when compiling the 'HelloWorld' example

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
MedievalMagic13

Linker error when compiling the 'HelloWorld' example

Post by MedievalMagic13 »

Hello everybody. I have made a copy from the 'HelloWorld' example from Irrlight onto my harddisk, but now I have these strange errors when compiling:

Irrlight game error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

and

Irrlight game fatal error LNK1120: 1 unresolved externals

The code is exactly the same as in the example from Irrlight, I have included the two folders(include and lib\VisualStudio) in Visual C++ and I have the Irrlight.dll in the C:\Windows\System32 folder. But I still got these errors.

Does somebody know the solution for this problem. Thanks very much.
t
Posts: 43
Joined: Sun Nov 02, 2003 2:59 am
Location: Australia

Post by t »

I think you've set the program up to compile as a windows app, when it should for this example be a console app.
MedievalMagic13

Post by MedievalMagic13 »

Thanks a lot. It works! I've made a windows application instead of a console application. It works fine now! :D
VeneX
Posts: 228
Joined: Sun Nov 30, 2003 3:32 pm
Location: The Netherlands
Contact:

Post by VeneX »

Is it possible, when I try to compile a tutorial, it is an windows app and not an console? It doesn't work actually. I just opened the dsw and compile it.
Visit my website @ www.venex.be
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
rt
Posts: 150
Joined: Sun Nov 30, 2003 6:54 am
Location: canada
Contact:

Post by rt »

VeneX wrote:Is it possible, when I try to compile a tutorial, it is an windows app and not an console? It doesn't work actually. I just opened the dsw and compile it.
it is possible. my irrlicht game is a windows app which has a

Code: Select all

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow){
entry point
Post Reply