Problem running an exe made in debug

Problems building or running the engine, queries about how to use features etc.
Post Reply
Jeff
Gnoblar
Posts: 17
Joined: Mon Feb 07, 2005 8:28 pm

Problem running an exe made in debug

Post by Jeff »

Nearly done with the awsome OGRE tutorials on Wiki

Code: Select all

Entity *pWaterEntity;
	Plane nWaterPlane;

	//create a water plane SceneNode
	nWaterPlane.normal = Vector3::UNIT_Y;
	nWaterPlane.d = -1.5;
	MeshManager::getSingleton().createPlane(
		"WaterPlane",
		nWaterPlane,
		8000, 8000,
		20, 20,
		true, 1,
		10, 10,
		Vector3::UNIT_Z);
Above is my code, and it's apparantly the last line that makes the compiler unhappy. Below is the only error that's thrown when I try to compile:

Code: Select all

Compiling...
TutorialApplication.cpp
C:\OgreTutorials\OgreTutorials\Tutorial6\TutorialApplication.cpp(73) : error C2664: 'createPlane' : cannot convert parameter 2 from 'class Ogre::Plane' to 'const class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char>
 > &'
        Reason: cannot convert from 'class Ogre::Plane' to 'const class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> >'
        No constructor could take the source type, or constructor overload resolution was ambiguous
Error executing cl.exe.

TutorialApplication.obj - 1 error(s), 0 warning(s)
I've has through both the Wiki tutorial and the one on the OGRE site - as there are inconsistencies between the two, but nothing is making itself apparant. Please help
Last edited by Jeff on Tue Feb 15, 2005 10:46 pm, edited 1 time in total.
Tommy
Gnoblar
Posts: 15
Joined: Sun Jan 23, 2005 5:48 pm
Location: Germany
Contact:

Post by Tommy »

The createPlane-method of MeshManager has been changed in Ogre 1.0 (have a look at the api-doc), there now is another parameter "groupName" after "name", which allows you to put the plane into a specific resource group. So try changing your code to this:

Code: Select all

Entity *pWaterEntity; 
Plane nWaterPlane; 

//create a water plane SceneNode 
nWaterPlane.normal = Vector3::UNIT_Y; 
nWaterPlane.d = -1.5; 
MeshManager::getSingleton().createPlane( 
      "WaterPlane", 
      "General",
      nWaterPlane, 
      8000, 8000, 
      20, 20, 
      true, 1, 
      10, 10, 
      Vector3::UNIT_Z);
Jeff
Gnoblar
Posts: 17
Joined: Mon Feb 07, 2005 8:28 pm

Post by Jeff »

Yep, that works - thanks for that. Guess I should look at the API a little harder next time...

Just one more thing, when I try to run the exe it says it's missing a library, I need an exe to show my teamates as we are all looking at different engines for use in a 1 player RPG prototype.

*yes I'm aware OGRE is not a game engine :P

So can anybody help with this (new) problem?
Post Reply