Error when including "nxogre.h"

dbrock

09-01-2008 06:40:35

I get the following errors when I included "NxOgre.h" into a new project
main.cpp
#include "windows.h"
#include "nxogre.h"

// Main entry point
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
{
// Exit safely
return 0;
}

1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(107) : error C2143: syntax error : missing ';' before '*'
1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(107) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(107) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(109) : warning C4183: 'getNxController': missing return type; assumed to be a member function returning 'int'
1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(120) : error C2143: syntax error : missing ';' before '*'
1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(120) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(120) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharacter.h(108) : error C2065: 'mCharacter' : undeclared identifier
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(80) : error C2143: syntax error : missing ';' before '*'
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(80) : warning C4183: 'getNxControllerManager': missing return type; assumed to be a member function returning 'int'
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(108) : error C2143: syntax error : missing ';' before '*'
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(108) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(108) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\dev\nxogre\nxogre\include\nxogrecharactercontroller.h(80) : error C2065: 'mControllerManager' : undeclared identifier


I've never had this problem before. I created a 3rd project, and did the exact same thing, and it worked. Is there some sort of project settings that could cause these types of errors?

betajaen

09-01-2008 08:43:07

You haven't included all of the required header folders and possibly the linker ones. Have a look at the Cake project settings of what you need, or read chapter 11 in the guide.

dbrock

09-01-2008 13:41:52

That was the first thing I did. I noticed that intellisense isn't picking up NxController, so you're right about a header file missing. But I'm certain I have all the include paths setup properly. I verified that the directory that contains NxController.h (...\SDKs\NxCharacter\include) is in my include path for the project.

my command line looks like this (since my macbookpro doesn't have a print screen button)
/Od /I "..\include" /I "C:\Programming\ogrenew\OgreMain\include" /I "C:\Programming\ogrenew\OgreMain\..\Dependencies\include" /I "C:\Programming\ogrenew\OgreMain\..\Samples\Common\CEGUIRenderer\include" /I "C:\Programming\AGEIA Technologies\SDK\v2.7.3\SDKs\Foundation\include" /I "C:\Programming\AGEIA Technologies\SDK\v2.7.3\SDKs\PhysXLoader\include" /I "C:\Programming\AGEIA Technologies\SDK\v2.7.3\SDKs\Physics\include" /I "C:\Programming\AGEIA Technologies\SDK\v2.7.3\SDKs\Cooking\include" /I "C:\Programming\AGEIA Technologies\SDK\v2.7.3\SDKs\NxCharacter\include" /I "C:\Programming\NxOgre\NxOgre\include" /I "C:\Programming\NxOgre\NxOgre\include\NxuStream2" /I "C:\Programming\fmod\api\inc" /I "C:\Programming\tinyxml" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MDd /Fo"obj\Debug\\" /Fd"obj\Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt

adding the following fixed the error, but I shouldn't have to do this.#include "NxController.h"
#include "NxControllerManager.h"
#include "nxogre.h"

dbrock

11-01-2008 06:09:01

Do you think me forgetting to install Visual Studio SP1 after formatting a possibility?

Edit: nvm, windows update took care of that for me :evil: