Jump to content
  • Advertisement
Sign in to follow this  
Shlaklava

Ogre Root

This topic is 3921 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a current class which creates the Root object for Ogre as such:
class Sample {
public:
   Sample(const string& pfile,const string& cfile,const string& lfile);
private:
   Ogre::Root* mRoot;
};

Sample::Sample(const string& pfile="plugin.cfg",const string& cfile="ogre.cfg",const string& lfile="Ogre.log") {
   mRoot=new Ogre::Root(pfile.c_str(),cfile.c_str(),lfile.c_str()); //SIGSEGV
};

The marked line compiles correctly but gives me a segmentation fault. This line worked previously (using Ogre version 1.4.3) before and even fails to work with mRoot public. All files are correctly there (and should have all of the correct data) and all of the libraries are there. What could be the problem? If you need more information than please tell me.

Share this post


Link to post
Share on other sites
Advertisement
The Ogre::Root constructor may be crashing. I'd recommend downloading the full Ogre sources and setting them up for debugging so that you can step inside them to see the exact location of the crash.

Share this post


Link to post
Share on other sites
Quote:
Original post by Shlaklava
I have a current class which creates the Root object for Ogre as such:

*** Source Snippet Removed ***
*** Source Snippet Removed ***

The marked line compiles correctly but gives me a segmentation fault. This line worked previously (using Ogre version 1.4.3) before and even fails to work with mRoot public.

All files are correctly there (and should have all of the correct data) and all of the libraries are there.

What could be the problem? If you need more information than please tell me.


Does it crash when you tell it to not load any files?

root = new Ogre::Root("", "", "gfx.log");

If not, then your plugins or config file is messed up (and BTW, I do not suggest using those 2 files - they've caused nothing but trouble for me).

Share this post


Link to post
Share on other sites
Thanks for the3 help but I found out the problem was that I was using a normal version of MingW with Code::Blocks and not the modified one.

Share this post


Link to post
Share on other sites
Good you came back and posted the solution though. I wish everybody did that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!