[no bug]Error on 1.6 while compile a game, on 1.5 function

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
prchakal
Posts: 58
Joined: Thu Sep 24, 2009 12:31 am

[no bug]Error on 1.6 while compile a game, on 1.5 function

Post by prchakal »

Hi,

I have a urgent problem, im developing a small game, and when i use 1.5.1 version of irrlicht it compile normal, like you see here:

http://www.prsolucoes.com/blog/projetos ... -versao-2/

But when i change the path to compile with irrlicht 1.6, i receive an error at the line:
device = createDevice(EDT_OPENGL, dimension2d<s32>(800, 600), 16, false, false, false, &receptorEvento);
The error is:
d:\prsoluções\softwares\evangel\evangel\classes\engine.cpp(71) : error C2664: 'irr::createDevice' : cannot convert parameter 2 from 'irr::core::dimension2d' to 'const irr::core::dimension2d &'
with
[
T=irr::s32
]
and
[
T=irr::u32
]
Reason: cannot convert from 'irr::core::dimension2d' to 'const irr::core::dimension2d'
with
[
T=irr::s32
]
and
[
T=irr::u32
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

What i can do incorrect?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Most dimensions used throughout Irrlicht have changed from 1.5 to 1.6 from s32 to u32. So you need to change those places from using s32 to u32. Simple as that. If you want to keep compatibility with older versions, you can either use an ifdef (Check for IRRLICHT_VERSION_MAJOR<2 and IRRLICHT_VERSION_MINOR<6 to use s32, else use u32) or you use a special typedef which is switched based on the formerly mentioned ifdef to either u32 or s32.
prchakal
Posts: 58
Joined: Thu Sep 24, 2009 12:31 am

ok, but now...

Post by prchakal »

Ok.

It function, but now i receive and error here:
int main(int argc, char* argv[])
The error is:
Generating Code...
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
D:\PRSoluções\Softwares\Evangel\Debug\Evangel.exe : fatal error LNK1120: 1 unresolved externals
Im using VS 2008
sRc
Posts: 431
Joined: Thu Jul 28, 2005 1:44 am
Location: Salt Lake City, Utah
Contact:

Post by sRc »

that one's project related, not Irrlicht. start by making sure it's set as a Console app and not a Windows app, int main() is the entry point for a console app. if that's not it, check these two articles for other info

http://support.microsoft.com/kb/125750
http://www.differentpla.net/content/200 ... winmain-16
The Bard sRc

Blog | Twitter
prchakal
Posts: 58
Joined: Thu Sep 24, 2009 12:31 am

Post by prchakal »

Solved :)

I forgot include de stdafx.h
#include "stdafx.h"
Thanks for all.
Post Reply