Initial Compile Error

Zach Griffin

15-02-2006 03:30:32

I've successfully compiled Ogre and can run the demos and was trying to compile and link OgreNewt with it. I have the main ogre directory being C:\Ogre\ogrenew and the OgreNewt installed in C:\Ogre\OgreNewt\OgreNewt\. The Newton SDK is installed to C:\NewtonSDK\. They are all the latest releases. When I try to compile the project in vs.NET 2003 I receive a host of errors saying it cant find the ogre.h file. Im pretty sure it has something to do with the included libs and include files but from reading the tutorial on the WIKI, I shouldnt have to change anything in the project settings. Any help is appreciated.

Zach

walaber

15-02-2006 04:02:19

please refer to the intsructions in the documentation. if you got OgreNewt from CVS, then please refer to the text at the top of OgreNewt.h, which is in OgreNewt_Main/include.

the base directories changed slightly from the original release.

Zach Griffin

15-02-2006 06:15:54

Thanks for replying Walaber. The version I downloaded is from your site http://walaber.com/misc/OgreNewt.rar which I did this morning. I am using Ogre 1.0.7 and did everything it said to in the OgreNewt.h file. I am still receiving the same errors even after changing the directory to ogre/ogreaddons/ogrenewt

Zach Griffin

16-02-2006 04:44:34

Ok I worked out the problem. The current version on Walabers site is intended for the Dagon CVS version and not the latest 1.0.7. Reverting to an older OgreNewt version and 1.0.6 fixed the problem and everything now compiles. Thanks for your help Walaber.

walaber

16-02-2006 05:48:16

well the only difference between working for Dagon and 1.0.x is the "destroyEntity" functions need to be reverted to their old name: "removeEntity". other than that, everything else should compile fine with either version of Ogre.

I recommend you use the latest version of OgreNewt, it's improved!

Horizon

16-02-2006 11:00:55

Directory is wrong: OgreNewt comes with a project for MSVC++ 7.1 and MSVC++ 8.0 (2005). unfortunately I have no other IDE's or compilers setup on my system, so I cannot provide any other projects. the MSVC solution should build out of the box, assuming you take a few things into consideration.

unzip this in the ogreaddons directory alongside your "ogrenew" directory. to compile correctly, it also assumes you have the Newton SDK installed in another directory alongside this one called "NewtonSDK".

for example something like this:

* c:/programming/Ogre/ogrenew <- ogre installation
* c:/programming/Ogre/ogreaddons/OgreNewt <- OgreNewt main directory.
* c:/programming/NewtonSDK <- Newton SDK
.

walaber

16-02-2006 17:29:34

it seems many people are having trouble with directories. I know it works if you set them up like the readme says.

however if you want a different direstory structure, or its not working, try adding Ogre and Newton to your global include/library directories in the IDE. this means it will find it no matter where the individual project is looking.

Horizon

16-02-2006 17:50:04

That's what I did at first, walaber, but just wait until you try to compile your project elsewhere. It's a hell of a lot of work setting up all the directories every time and that's without having to tell other people how to do it :).

misterface

16-02-2006 18:16:53

I manually set the directories corectly but when I run a demo I get the message: can't find Newton.dll

very strange, it's in my path!

walaber

16-02-2006 19:06:32

That's what I did at first, walaber, but just wait until you try to compile your project elsewhere. It's a hell of a lot of work setting up all the directories every time and that's without having to tell other people how to do it
that's why I mentioned setting the global include directories in your IDE. then the settings can be wrong int he project settings, and the files will still be found.

misterface - make sure newton.dll is in the same directory as your .exe file, or in your windows/system32 directory. i would recommend just putting it in with your other ogre dlls, in with the executable.

Horizon

16-02-2006 22:10:30

that's why I mentioned setting the global include directories in your IDE. then the settings can be wrong int he project settings, and the files will still be found.

Actually, what I meant is that it's better to set the project settings correctly so you can just share a complete directory through ftp or some such thing. Then the only thing you need to do is run tortoiseCVS in a few directories and everything compiles. Beats having to set up 10+ directories in global settings :).

walaber

16-02-2006 23:05:39

i'm not sure what you mean. if you have a direstory structure like I mention in the readme, it copiles right out of the box...

Horizon

17-02-2006 00:01:51

Yeah and that's how I love it :).