Sign in to follow this  
jchmack

compiler error in ogre 3d (error C4430: missing type specifier - int assumed.)

Recommended Posts

im now following this tutorial: http://www.ogre3d.org/wiki/index.php/Practical_Application i downloaded the source from his page here: http://www.dayark.com/PracticalApp.zip or at the bottom of this page:http://www.ogre3d.org/wiki/index.php/Practical_Application_-_Let%27s_Get_Started i download OIS and linked everything well ( i hope) but now im getting this error: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int refering to this line of code: WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) im using: Microsoft Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200) Microsoft .NET Framework Version 2.0.50727 Installed Edition: Professional Microsoft Visual Basic 2005 77626-009-0000007-41909 Microsoft Visual Basic 2005 Microsoft Visual C# 2005 77626-009-0000007-41909 Microsoft Visual C# 2005 Microsoft Visual C++ 2005 77626-009-0000007-41909 Microsoft Visual C++ 2005 Microsoft Visual J# 2005 77626-009-0000007-41909 Microsoft Visual J# 2005 Microsoft Visual Web Developer 2005 77626-009-0000007-41909 Microsoft Visual Web Developer 2005 Crystal Reports AAC60-G0CSA4B-V7000AY Crystal Reports for Visual Studio 2005 i think its something to do with the author using VC2003 and im using VC2005

Share this post


Link to post
Share on other sites
Quote:
WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)


WINAPI is just a #define for __stdcall. This is a calling convention, not a return type. Change it to be:

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)

And your problem is solved!

Share this post


Link to post
Share on other sites
the above post was me.

ok i fixed the compile error and now im getting this liking error:

LINK : fatal error LNK1104: cannot open file 'OIS_d.lib'

i downloaded ois 0.5.0 here:

http://sourceforge.net/project/showfiles.php?group_id=149835

and there aren't .lib files anywhere in the zip file. The lib folder only has a file called .keepme and the only google link to 'OIS_d.lib' is back to the practical application tutoral lol:

http://www.google.com/search?num=100&hl=en&lr=&safe=off&q=OIS_d.lib&btnG=Search

Share this post


Link to post
Share on other sites
Quote:
Original post by jchmack
the above post was me.

ok i fixed the compile error and now im getting this liking error:

LINK : fatal error LNK1104: cannot open file 'OIS_d.lib'

i downloaded ois 0.5.0 here:

http://sourceforge.net/project/showfiles.php?group_id=149835

and there aren't .lib files anywhere in the zip file. The lib folder only has a file called .keepme and the only google link to 'OIS_d.lib' is back to the practical application tutoral lol:

http://www.google.com/search?num=100&hl=en&lr=&safe=off&q=OIS_d.lib&btnG=Search


You have to compile OIS too - grab the windows source package, find the .sln file and rebuild :)

Regards,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this