Problem with compiling tutorial

mharezlak96

05-10-2010 19:40:59

I compiling tutorial from this site: http://www.newtondynamics.com/wiki/inde ... ners_guide

I download project file and I add 3 files (main.cpp, OgreNewtApplication.h, OgreNewtApplication.cpp) to my empty project in VS C++ 2008. I add required files in project setting.

Errors:
1>c:\users\x\documents\visual studio 2008\projects\lensnewton2\.\ogrenewtapplication.h(13) : error C2039: 'BasicFrameListener' : is not a member of 'OgreNewt'
1>c:\users\x\documents\visual studio 2008\projects\lensnewton2\.\ogrenewtapplication.h(13) : error C2143: syntax error : missing ';' before '*'
1>c:\users\x\documents\visual studio 2008\projects\lensnewton2\.\ogrenewtapplication.h(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\x\documents\visual studio 2008\projects\lensnewton2\.\ogrenewtapplication.h(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\OgreNewtApplication.cpp(26) : error C2661: 'OgreNewt::CollisionPrimitives::Box::Box' : no overloaded function takes 2 arguments
1>..\OgreNewtApplication.cpp(27) : error C2664: 'OgreNewt::Body::Body(const OgreNewt::World *,const OgreNewt::CollisionPtr &,int)' : cannot convert parameter 2 from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr &'
1> Reason: cannot convert from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr'
1> Constructor for class 'boost::shared_ptr<T>' is declared 'explicit'
1> with
1> [
1> T=OgreNewt::Collision
1> ]
1>..\OgreNewtApplication.cpp(29) : error C2039: 'attachToNode' : is not a member of 'OgreNewt::Body'
1> d:\dx\graszkola\ogrenewt\inc\OgreNewt_Body.h(38) : see declaration of 'OgreNewt::Body'
1>..\OgreNewtApplication.cpp(36) : warning C4305: 'argument' : truncation from 'double' to 'const Ogre::Real'
1>..\OgreNewtApplication.cpp(43) : error C2661: 'OgreNewt::CollisionPrimitives::Cylinder::Cylinder' : no overloaded function takes 3 arguments
1>..\OgreNewtApplication.cpp(44) : error C2664: 'OgreNewt::Body::Body(const OgreNewt::World *,const OgreNewt::CollisionPtr &,int)' : cannot convert parameter 2 from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr &'
1> Reason: cannot convert from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr'
1> Constructor for class 'boost::shared_ptr<T>' is declared 'explicit'
1> with
1> [
1> T=OgreNewt::Collision
1> ]
1>..\OgreNewtApplication.cpp(45) : error C2039: 'attachToNode' : is not a member of 'OgreNewt::Body'
1> d:\dx\graszkola\ogrenewt\inc\OgreNewt_Body.h(38) : see declaration of 'OgreNewt::Body'
1>..\OgreNewtApplication.cpp(52) : error C3083: 'MomentOfInertia': the symbol to the left of a '::' must be a type
1>..\OgreNewtApplication.cpp(52) : error C2039: 'CalcCylinderSolid' : is not a member of 'OgreNewt'
1>..\OgreNewtApplication.cpp(52) : error C3861: 'CalcCylinderSolid': identifier not found
1>..\OgreNewtApplication.cpp(60) : warning C4305: 'argument' : truncation from 'double' to 'const Ogre::Real'
1>..\OgreNewtApplication.cpp(60) : warning C4305: 'argument' : truncation from 'double' to 'const Ogre::Real'
1>..\OgreNewtApplication.cpp(67) : error C2661: 'OgreNewt::CollisionPrimitives::Cone::Cone' : no overloaded function takes 3 arguments
1>..\OgreNewtApplication.cpp(68) : error C2664: 'OgreNewt::Body::Body(const OgreNewt::World *,const OgreNewt::CollisionPtr &,int)' : cannot convert parameter 2 from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr &'
1> Reason: cannot convert from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr'
1> Constructor for class 'boost::shared_ptr<T>' is declared 'explicit'
1> with
1> [
1> T=OgreNewt::Collision
1> ]
1>..\OgreNewtApplication.cpp(69) : error C2039: 'attachToNode' : is not a member of 'OgreNewt::Body'
1> d:\dx\graszkola\ogrenewt\inc\OgreNewt_Body.h(38) : see declaration of 'OgreNewt::Body'
1>..\OgreNewtApplication.cpp(76) : error C3083: 'MomentOfInertia': the symbol to the left of a '::' must be a type
1>..\OgreNewtApplication.cpp(76) : error C2039: 'CalcCylinderSolid' : is not a member of 'OgreNewt'
1>..\OgreNewtApplication.cpp(76) : error C3861: 'CalcCylinderSolid': identifier not found
1>..\OgreNewtApplication.cpp(90) : error C2661: 'OgreNewt::CollisionPrimitives::Box::Box' : no overloaded function takes 2 arguments
1>..\OgreNewtApplication.cpp(91) : error C2664: 'OgreNewt::Body::Body(const OgreNewt::World *,const OgreNewt::CollisionPtr &,int)' : cannot convert parameter 2 from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr &'
1> Reason: cannot convert from 'OgreNewt::Collision *' to 'const OgreNewt::CollisionPtr'
1> Constructor for class 'boost::shared_ptr<T>' is declared 'explicit'
1> with
1> [
1> T=OgreNewt::Collision
1> ]
1>..\OgreNewtApplication.cpp(92) : error C2039: 'attachToNode' : is not a member of 'OgreNewt::Body'
1> d:\dx\graszkola\ogrenewt\inc\OgreNewt_Body.h(38) : see declaration of 'OgreNewt::Body'
1>..\OgreNewtApplication.cpp(99) : error C3083: 'MomentOfInertia': the symbol to the left of a '::' must be a type
1>..\OgreNewtApplication.cpp(99) : error C2039: 'CalcBoxSolid' : is not a member of 'OgreNewt'
1>..\OgreNewtApplication.cpp(99) : error C3861: 'CalcBoxSolid': identifier not found
1>..\OgreNewtApplication.cpp(122) : error C2065: 'mOgreNewtListener' : undeclared identifier
1>..\OgreNewtApplication.cpp(122) : error C2039: 'BasicFrameListener' : is not a member of 'OgreNewt'
1>..\OgreNewtApplication.cpp(122) : error C2061: syntax error : identifier 'BasicFrameListener'
1>..\OgreNewtApplication.cpp(123) : error C2065: 'mOgreNewtListener' : undeclared identifier


What is bad? Where i find working tutorial?

SFCBias

06-10-2010 16:56:50

That tutorial is ancient. You can try looking at the minimal OgreNewt application to see how it works and as far as compiling. Try looking at my update to the tutorial here http://www.ogre3d.org/tikiwiki/OgreNewt+2

mharezlak96

06-10-2010 21:19:25

I edit my code and i compiled this tutorial, but "game" don't work. Exiting when game loading.

Ogre logs:
22:16:20: Creating resource group General
22:16:20: Creating resource group Internal
22:16:20: Creating resource group Autodetect
22:16:20: SceneManagerFactory for type 'DefaultSceneManager' registered.
22:16:20: Registering ResourceManager for type Material
22:16:20: Registering ResourceManager for type Mesh
22:16:20: Registering ResourceManager for type Skeleton
22:16:20: MovableObjectFactory for type 'ParticleSystem' registered.
22:16:20: OverlayElementFactory for type Panel registered.
22:16:20: OverlayElementFactory for type BorderPanel registered.
22:16:20: OverlayElementFactory for type TextArea registered.
22:16:20: Registering ResourceManager for type Font
22:16:20: ArchiveFactory for archive type FileSystem registered.
22:16:20: ArchiveFactory for archive type Zip registered.
22:16:20: DDS codec registering
22:16:20: FreeImage version: 3.13.1
22:16:20: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
22:16:20: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,bay,bmq,cr2,crw,cs1,dc2,dcr,dng,erf,fff,hdr,k25,kdc,mdc,mos,mrw,nef,orf,pef,pxn,raf,raw,rdc,sr2,srf,arw,3fr,cine,ia,kc2,mef,nrw,qtk,rw2,sti,drf,dsc,ptx,cap,iiq,rwz
22:16:20: Registering ResourceManager for type HighLevelGpuProgram
22:16:20: Registering ResourceManager for type Compositor
22:16:20: MovableObjectFactory for type 'Entity' registered.
22:16:20: MovableObjectFactory for type 'Light' registered.
22:16:20: MovableObjectFactory for type 'BillboardSet' registered.
22:16:20: MovableObjectFactory for type 'ManualObject' registered.
22:16:20: MovableObjectFactory for type 'BillboardChain' registered.
22:16:20: MovableObjectFactory for type 'RibbonTrail' registered.
22:16:20: *-*-* OGRE Initialising
22:16:20: *-*-* Version 1.7.1 (Cthugha)
22:16:20: Loading library RenderSystem_Direct3D9
22:16:20: Installing plugin: D3D9 RenderSystem
22:16:20: D3D9 : Direct3D9 Rendering Subsystem created.
22:16:20: D3D9: Driver Detection Starts
22:16:20: D3D9: Driver Detection Ends
22:16:20: Plugin successfully installed
22:16:20: Loading library RenderSystem_GL
22:16:20: Installing plugin: GL RenderSystem
22:16:20: OpenGL Rendering Subsystem created.
22:16:20: Plugin successfully installed
22:16:20: Loading library Plugin_CgProgramManager
22:16:20: Installing plugin: Cg Program Manager
22:16:20: Plugin successfully installed
22:16:20: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
22:16:20: D3D9 : RenderSystem Option: FSAA = 0
22:16:20: D3D9 : RenderSystem Option: Floating-point mode = Fastest
22:16:20: D3D9 : RenderSystem Option: Full Screen = Yes
22:16:20: D3D9 : RenderSystem Option: Rendering Device = Monitor-1-ATI Mobility Radeon HD 4500 Series
22:16:20: D3D9 : RenderSystem Option: Resource Creation Policy = Create on all devices
22:16:20: D3D9 : RenderSystem Option: VSync = No
22:16:20: D3D9 : RenderSystem Option: VSync Interval = 1
22:16:20: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
22:16:20: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
22:16:21: CPU Identifier & Features
22:16:21: -------------------------
22:16:21: * CPU ID: GenuineIntel: Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
22:16:21: * SSE: yes
22:16:21: * SSE2: yes
22:16:21: * SSE3: yes
22:16:21: * MMX: yes
22:16:21: * MMXEXT: yes
22:16:21: * 3DNOW: no
22:16:21: * 3DNOWEXT: no
22:16:21: * CMOV: yes
22:16:21: * TSC: yes
22:16:21: * FPU: yes
22:16:21: * PRO: yes
22:16:21: * HT: no
22:16:21: -------------------------
22:16:21: D3D9 : Subsystem Initialising
22:16:21: Registering ResourceManager for type Texture
22:16:21: Registering ResourceManager for type GpuProgram
22:16:21: D3D9RenderSystem::_createRenderWindow "OgreNewt Minimal Application", 800x600 fullscreen miscParams: FSAA=0 FSAAHint= colourDepth=32 gamma=false monitorIndex=0 useNVPerfHUD=false vsync=false vsyncInterval=1
22:16:21: D3D9 : Created D3D9 Rendering Window 'OgreNewt Minimal Application' : 800x600, 32bpp
22:16:23: D3D9: Vertex texture format supported - PF_L8
22:16:23: D3D9: Vertex texture format supported - PF_L16
22:16:23: D3D9: Vertex texture format supported - PF_A8
22:16:23: D3D9: Vertex texture format supported - PF_A4L4
22:16:23: D3D9: Vertex texture format supported - PF_BYTE_LA
22:16:23: D3D9: Vertex texture format supported - PF_R5G6B5
22:16:23: D3D9: Vertex texture format supported - PF_B5G6R5
22:16:23: D3D9: Vertex texture format supported - PF_A4R4G4B4
22:16:23: D3D9: Vertex texture format supported - PF_A1R5G5B5
22:16:23: D3D9: Vertex texture format supported - PF_A8R8G8B8
22:16:23: D3D9: Vertex texture format supported - PF_B8G8R8A8
22:16:23: D3D9: Vertex texture format supported - PF_A2R10G10B10
22:16:23: D3D9: Vertex texture format supported - PF_A2B10G10R10
22:16:23: D3D9: Vertex texture format supported - PF_DXT1
22:16:23: D3D9: Vertex texture format supported - PF_DXT2
22:16:23: D3D9: Vertex texture format supported - PF_DXT3
22:16:23: D3D9: Vertex texture format supported - PF_DXT4
22:16:23: D3D9: Vertex texture format supported - PF_DXT5
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
22:16:23: D3D9: Vertex texture format supported - PF_X8R8G8B8
22:16:23: D3D9: Vertex texture format supported - PF_X8B8G8R8
22:16:23: D3D9: Vertex texture format supported - PF_R8G8B8A8
22:16:23: D3D9: Vertex texture format supported - PF_DEPTH
22:16:23: D3D9: Vertex texture format supported - PF_SHORT_RGBA
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT16_R
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT32_R
22:16:23: D3D9: Vertex texture format supported - PF_SHORT_GR
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT16_GR
22:16:23: D3D9: Vertex texture format supported - PF_FLOAT32_GR
22:16:23: D3D9: Vertex texture format supported - PF_SHORT_RGB
22:16:23: D3D9: Vertex texture format supported - PF_PVRTC_RGB2
22:16:23: D3D9: Vertex texture format supported - PF_PVRTC_RGBA2
22:16:23: D3D9: Vertex texture format supported - PF_PVRTC_RGB4
22:16:23: D3D9: Vertex texture format supported - PF_PVRTC_RGBA4
22:16:23: RenderSystem capabilities
22:16:23: -------------------------
22:16:23: RenderSystem Name: Direct3D9 Rendering Subsystem
22:16:23: GPU Vendor: ati
22:16:23: Device Name: Monitor-1-ATI Mobility Radeon HD 4500 Series
22:16:23: Driver Version: 8.14.10.678
22:16:23: * Fixed function pipeline: yes
22:16:23: * Hardware generation of mipmaps: yes
22:16:23: * Texture blending: yes
22:16:23: * Anisotropic texture filtering: yes
22:16:23: * Dot product texture operation: yes
22:16:23: * Cube mapping: yes
22:16:23: * Hardware stencil buffer: yes
22:16:23: - Stencil depth: 8
22:16:23: - Two sided stencil support: yes
22:16:23: - Wrap stencil values: yes
22:16:23: * Hardware vertex / index buffers: yes
22:16:23: * Vertex programs: yes
22:16:23: * Number of floating-point constants for vertex programs: 256
22:16:23: * Number of integer constants for vertex programs: 16
22:16:23: * Number of boolean constants for vertex programs: 16
22:16:23: * Fragment programs: yes
22:16:23: * Number of floating-point constants for fragment programs: 224
22:16:23: * Number of integer constants for fragment programs: 16
22:16:23: * Number of boolean constants for fragment programs: 16
22:16:23: * Geometry programs: no
22:16:23: * Number of floating-point constants for geometry programs: 0
22:16:23: * Number of integer constants for geometry programs: 0
22:16:23: * Number of boolean constants for geometry programs: 0
22:16:23: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
22:16:23: * Texture Compression: yes
22:16:23: - DXT: yes
22:16:23: - VTC: no
22:16:23: - PVRTC: no
22:16:23: * Scissor Rectangle: yes
22:16:23: * Hardware Occlusion Query: yes
22:16:23: * User clip planes: yes
22:16:23: * VET_UBYTE4 vertex element type: yes
22:16:23: * Infinite far plane projection: yes
22:16:23: * Hardware render-to-texture: yes
22:16:23: * Floating point textures: yes
22:16:23: * Non-power-of-two textures: yes
22:16:23: * Volume textures: yes
22:16:23: * Multiple Render Targets: 4
22:16:23: - With different bit depths: yes
22:16:23: * Point Sprites: yes
22:16:23: * Extended point parameters: yes
22:16:23: * Max Point Size: 10
22:16:23: * Vertex texture fetch: yes
22:16:23: * Number of world matrices: 0
22:16:23: * Number of texture units: 8
22:16:23: * Stencil buffer depth: 8
22:16:23: * Number of vertex blend matrices: 0
22:16:23: - Max vertex textures: 4
22:16:23: - Vertex textures shared: no
22:16:23: * Render to Vertex Buffer : no
22:16:23: * DirectX per stage constants: yes
22:16:23: ***************************************
22:16:23: *** D3D9 : Subsystem Initialised OK ***
22:16:23: ***************************************
22:16:23: DefaultWorkQueue('Root') initialising on thread 006D13C8.
22:16:23: Particle Renderer Type 'billboard' registered
22:16:23: DefaultWorkQueue('Root')::WorkerFunc - thread 006FDAE0 starting.
22:16:23: Added resource location 'media/gui' of type 'FileSystem' to resource group 'General'
22:16:23: DefaultWorkQueue('Root')::WorkerFunc - thread 006FDB10 starting.
22:16:23: Added resource location 'media/materials/scripts' of type 'FileSystem' to resource group 'General'
22:16:23: Added resource location 'media/fonts' of type 'FileSystem' to resource group 'General'
22:16:23: Added resource location 'media/primitives' of type 'FileSystem' to resource group 'General'
22:16:23: Added resource location 'media/meshes' of type 'FileSystem' to resource group 'General'
22:16:23: Initialising resource group General
22:16:23: Parsing scripts for resource group General
22:16:23: Parsing script debug.material
22:16:23: Parsing script debug.fontdef
22:16:23: Finished parsing scripts for resource group General