Dam thing won't complie

danharibo

24-03-2006 19:38:09

when i try to complie an app using ogrenewt it comes up with:
------ Build started: Project: dropshipdemo, Configuration: Debug Win32 ------
Compiling...
dropshipdemo.cpp
c:\ogrenewt\ogrenewt_main\inc\ogrenewt_debugger.h(67) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
c:\ogrenewt\ogrenewt_main\inc\ogrenewt_debugger.h(70) : error C2143: syntax error : missing ';' before '*'
c:\ogrenewt\ogrenewt_main\inc\ogrenewt_debugger.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\ogrenewt\ogrenewt_main\inc\ogrenewt_debugger.h(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\pro.com\my documents\visual studio 2005\projects\dropshipdemo\dropshipdemo\include\dropshipdemo.h(88) : Build log was saved at "file://c:\Documents and Settings\pro.com\My Documents\Visual Studio 2005\Projects\dropshipdemo\dropshipdemo\obj\Debug\BuildLog.htm"
dropshipdemo - 5 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
the only time i call ogrenewt is with:
OgreNewt::World();

OgreNewt::Body::Body(getWorld(),OgreNewt::CollisionPrimitives::Box,0);
if there is a problem with my code plz tell me

HexiDave

25-03-2006 02:40:49

Check where you're using the #include directive - looks like it's reporting an error there. Make sure you don't have an extra character floating around there. Also check to see the header files that are included before the OgreNewt files to see if something is defined wrong (forgetting a semicolon somewhere probably.)

danharibo

25-03-2006 13:37:49

i got it to stop errors but now i get this instead dropshipdemo.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::World::~World(void)" (??1World@OgreNewt@@QAE@XZ)
dropshipdemo.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::World::World(void)" (??0World@OgreNewt@@QAE@XZ)
bin\Debug\dropshipdemo.exe : fatal error LNK1120: 2 unresolved externals

HexiDave

25-03-2006 16:12:13

Right, what are you doing just calling
OgreNewt::World();

If you want to create a new World, you do this:
OgreNewt::World *mWorld = new OgreNewt::World();

and use mWorld (or whatever you name it) to pass your Newton World object. The error that is being thrown is that there are no functions called World() that take zero arguments.

danharibo

25-03-2006 22:02:47

ooooooo :oops: