pidmaster
19-06-2006 23:06:09
I'm new to programing so my code is mostly an amalgam of several of the wiki tutorials, a bit of trail and error, etc. I've got a working Ogre application without the ofusion scene loader library and this code originated from that working code, minus the code I had for manualy constructing my scene(and some code that had to do with input that is not relevant to testing the scene loader). Now I am trying to recreate the same scene using the scene loader.
First, my code. Second, the error that I am getting.
Any clue as to how I can begin trying to fix this problem would be appreciated. With my limited knowledge I can only procede through trial and error or with the example of other code, in the absence of that it's mostly guesswork. This error points me to a file outside of my main file that I can't, or rather, shouldn't change directly so for me it is a dead end because I have no clue what to try and change in my application to fix it. I could not find a resolution on the wiki or elsewhere on these forums, so I posted here. My thanks in advance for any help anyone might be able to offer.
In case it helps, I use Codeblocks as my IDE.
First, my code. Second, the error that I am getting.
#include <iostream>
#include <string>
#include <Ogre.h>
#include <OgreOSMScene.h>
#include <IOSMSceneCallbacks.h>
#include <tinyxml.h>
#define OgreProject "C:\\OgreProject"
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
INT WINAPI WinMain(HINSTANCE hinst, HINSTANCE, LPSTR strCmdLine, INT)
#else
int main(int argc, char **argv)
#endif
{
using namespace Ogre;
Root *root = new Root();
RenderSystemList *rsList = root->getAvailableRenderers();
int c = 0;
RenderSystem *selectedRenderSystem = 0;
do
{
if (c == (int) rsList->size())
return 0;
selectedRenderSystem = rsList->at(c);
c++;
}
while (selectedRenderSystem->getName().compare("Direct3D9 Rendering Subsystem") !=0);
root->setRenderSystem(selectedRenderSystem);
selectedRenderSystem->setConfigOption("Full Screen","No");
selectedRenderSystem->setConfigOption("Video Mode","800 x 600 @ 32-bit colour");
ConfigOptionMap comap = selectedRenderSystem->getConfigOptions();
ConfigOptionMap::const_iterator start = comap.begin();
ConfigOptionMap::const_iterator end = comap.end();
while (start != end)
{
String OptionName = start->first;
String CurrentValue = start->second.currentValue;
StringVector PossibleValues = start->second.possibleValues;
int c=0;
while (c < (int) PossibleValues.size())
{
String OneValue = PossibleValues.at(c);
c++;
}
start++;
}
root->initialise(false);
RenderWindow* window = root->createRenderWindow("Main",800,600,false);
OSMScene oScene;
oScene.initialise("crate_scene.osm");
oScene.createScene();
SceneManager *sceneMgr = oScene.getSceneManager();
return 0;
}
obj\Debug\OgreProject\OgreProject\mainFusion.o: In function `ZN4Ogre13_ConfigOptionC1ERKS0_':C:/OgreSDK/stlport/stlport/stl/_pair.h:54: undefined reference to `OSMScene::OSMScene(Ogre::SceneManager*, Ogre::RenderWindow*)'
:C:/OgreSDK/stlport/stlport/stl/_pair.h:54: undefined reference to `OSMScene::initialise(char const*, OSMSceneCallbacks*)'
:C:/OgreSDK/stlport/stlport/stl/_pair.h:54: undefined reference to `OSMScene::createScene(Ogre::SceneNode*)'
:C:/OgreSDK/stlport/stlport/stl/_pair.h:54: undefined reference to `OSMScene::~OSMScene()'
:C:/OgreSDK/stlport/stlport/stl/_pair.h:54: undefined reference to `OSMScene::~OSMScene()'
Any clue as to how I can begin trying to fix this problem would be appreciated. With my limited knowledge I can only procede through trial and error or with the example of other code, in the absence of that it's mostly guesswork. This error points me to a file outside of my main file that I can't, or rather, shouldn't change directly so for me it is a dead end because I have no clue what to try and change in my application to fix it. I could not find a resolution on the wiki or elsewhere on these forums, so I posted here. My thanks in advance for any help anyone might be able to offer.
In case it helps, I use Codeblocks as my IDE.