Author Topic: Project runs improperly in IDE, but works fine outside  (Read 3547 times)

Offline freak1k

  • Single posting newcomer
  • *
  • Posts: 2
Project runs improperly in IDE, but works fine outside
« on: October 23, 2010, 01:23:30 pm »
I hate posting a new topic, but I wasn't sure where to even look for this.  Although I am using Ogre3D, this seems to be a C::B related issue.

I have set up the base application as indicated in the Ogre wiki.  This is not the first time that I have set it up, but the first time that I have set up version 1.7.1.  The program builds correctly, and runs.  If I run it from the folder, it runs just fine without error.  The problem is that when I run it from inside the IDE, it gives me an exception because it cannot find certain files.  This is what leads me to believe some of my settings are wrong.  It leads me to believe that it is searching in different paths when it is run from inside the IDE, but I cannot find a way to control this behavior.

My question is, is the debugger or something inside C::B that is changing the search path for executables running from within the IDE, or is it something else that I am not seeing in the settings?  Is there some kind of environment variable I should know about?  I have been screwing with this for about a week now to no avail.  The error code itself lends nothing useful in searches.

OS: Windows XP (I do reinstall this every 6 months at least, that is the only change since last time I messed with Ogre)
CPU: AMD Athalon 64 X2 dual core 5200+
Vid Card: nVidia 8500GT (I know it is old, but at least I know its prob not the card as I have used Ogre with it before)
4GB RAM
I have all the Windows SDK's installed

Thank you

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Project runs improperly in IDE, but works fine outside
« Reply #1 on: October 23, 2010, 02:18:36 pm »
Compiler Name and Version?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Project runs improperly in IDE, but works fine outside
« Reply #2 on: October 23, 2010, 02:32:01 pm »
You should check the targets execution working directory, default for a newly generated project is the projects root directory, not the directory where the executable is created.
That can lead to problems, if you search resources in relative paths.

Offline freak1k

  • Single posting newcomer
  • *
  • Posts: 2
Re: Project runs improperly in IDE, but works fine outside
« Reply #3 on: October 23, 2010, 03:04:30 pm »
Thank you jens.  This is now solved.

I had seen this in the menu, but had dismissed it as I did not know what it meant.  I'm not exactly a beginner, but I can't say that I am proficient at it either.  Sometimes something is just right in front of your face and you need someone to tell you.

BTW this is under [ project => properties => build targets ] for anyone else who is looking for it.

Thank you for your help.
« Last Edit: October 23, 2010, 03:13:58 pm by freak1k »