project problems

misterface

13-04-2006 19:23:48

Hi,

I can compile my ogrenew project (a demo project) successfully: 0 errors!

But when I import the ogrenew headers & source from the demo project into a Windows Form Application I get many errors:

Error 1 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\eindwerk\Ogre\ogreaddons\OgreNewt\demos\Demo05_SimpleVehicle\Demo05.cpp 22
Error 2 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\eindwerk\Ogre\ogreaddons\OgreNewt\demos\Demo05_SimpleVehicle\Geluid.cpp 23
Error 3 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\eindwerk\Ogre\ogreaddons\OgreNewt\demos\Demo05_SimpleVehicle\Joystick.cpp 29
Error 4 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\eindwerk\Ogre\ogreaddons\OgreNewt\demos\Include\Line3D.cpp 143
Error 5 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\eindwerk\Ogre\ogreaddons\OgreNewt\demos\Demo05_SimpleVehicle\OgreNewtonApplication.cpp 384
Error 6 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\eindwerk\Ogre\ogreaddons\OgreNewt\demos\Demo05_SimpleVehicle\OgreNewtonFrameListener.cpp 396
Error 7 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? c:\eindwerk\Ogre\ogreaddons\OgreNewt\demos\Demo05_SimpleVehicle\SimpleVehicle.cpp 246
Error 4958 error C3641: 'OgreNewt::BodyIterator::newtonIterator' : invalid calling convention '__cdecl ' for function compiled with /clr:pure or /clr:safe c:\eindwerk\ogre\ogreaddons\ogrenewt\ogrenewt_main\inc\OgreNewt_BodyIterator.h 78


How do I solve these errors?
(The reason why I import it into another project is this: I want to run the OgreNew engine when I click a button in a Windows Form Application with this command:


OgreNewtonApplication app;

try {
app.go();
} catch( Ogre::Exception& e ) {
printf( "An Error HAS OCCURED: %s", e.getFullDescription() );
}
return 0;
[quote][/quote]

walaber

13-04-2006 19:45:15

looks like your compiler settings are set to use precompiled headers, which it can't find... try adjusting the compile settings.

Virginie

02-04-2009 10:09:34

Hello,
I would like to install ogreNewt.
I use Visual Studio 2005, ogre 1.6.1,NewtonSDK 1.53 and the last ogrenewt (update in the svn serveur : https://ogreaddons.svn.sourceforge.net/ ... /ogrenewt/).

When I compile demos with Vc++ I've got these errors:
'setNormaliseNormals' : is not a member of 'Ogre::Entity'
'getWorldOrientation' : is not a member of 'Ogre::SceneNode'
'getWorldPosition' : is not a member of 'Ogre::SceneNode'

But It's not important, because there are just some demos.

My real problem is that when I do a little program test I've got one error in many many warning :
OgreNewt::BodyIterator::newtonIterator' : invalid calling convention '__cdecl ' for function compiled with /clr:pure or /clr:safe

This error is created when I call #include <OgreNewt.h> and I don't use the class OgreNewt::BodyIterator::newtonIterator.

I solve this problem with the compilation /clr (not pure or safe)

Thank you

Virginie

03-04-2009 15:30:36

I've an other probleme.

I've done a little test program to see if ogrenewt was installed as well but not! lol

My main programme is :
#include "stdafx.h"
#include "OgreNewtApplication.h"

int main()
{
OgreNewtApplication *testApp = new OgreNewtApplication();
OgreNewt::World *myWorld;

myWorld = testApp->getMyWorld();

delete testApp;

std::cout<<"Bravo!!!"<<std::endl;

return 0;
}

And errors are :
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>test.obj : error LNK2028: unresolved token (0A000DDF) "public: __thiscall OgreNewtApplication::~OgreNewtApplication(void)" (??1OgreNewtApplication@@$$FQAE@XZ) referenced in function "public: void * __thiscall OgreNewtApplication::`scalar deleting destructor'(unsigned int)" (??_GOgreNewtApplication@@$$FQAEPAXI@Z)
1>test.obj : error LNK2028: unresolved token (0A000DE1) "public: class OgreNewt::World * __thiscall OgreNewtApplication::getMyWorld(void)" (?getMyWorld@OgreNewtApplication@@$$FQAEPAVWorld@OgreNewt@@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>test.obj : error LNK2028: unresolved token (0A000DE2) "public: __thiscall OgreNewtApplication::OgreNewtApplication(void)" (??0OgreNewtApplication@@$$FQAE@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>test.obj : error LNK2019: unresolved external symbol "public: __thiscall OgreNewtApplication::~OgreNewtApplication(void)" (??1OgreNewtApplication@@$$FQAE@XZ) referenced in function "public: void * __thiscall OgreNewtApplication::`scalar deleting destructor'(unsigned int)" (??_GOgreNewtApplication@@$$FQAEPAXI@Z)
1>test.obj : error LNK2019: unresolved external symbol "public: class OgreNewt::World * __thiscall OgreNewtApplication::getMyWorld(void)" (?getMyWorld@OgreNewtApplication@@$$FQAEPAVWorld@OgreNewt@@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>test.obj : error LNK2019: unresolved external symbol "public: __thiscall OgreNewtApplication::OgreNewtApplication(void)" (??0OgreNewtApplication@@$$FQAE@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>C:\Documents and Settings\fournier\Mes documents\Visual Studio 2005\Projects\test\Debug\test.exe : fatal error LNK1120: 6 unresolved externals

Problems are when I do the "new" and "delete" so I think that ogrenewt is not installed well.

I don't know why!

Zero23

03-04-2009 16:44:28

Hmm the linker cant find the OgreNewtApplication. Try to add the Header and the Cpp from the OgreNewtApplication to you project and try to compile!

Zero