First, the background:
WindowsXP
Code::Blocks IDE Sep 6, 2006 build
wxWidgets 2.7
Irrlicht Graphics Engine v 1.1
I'm building a win32 app with irrlicht embedded in a wx control. When I compile for debug, and press F9 (run) in codeblocks, it runs perfectly. But when I try and run the exe externally (just double-clicking on the .exe file) it crashes. Also, if I compile for release it won't run either way. This is a huge problem! Anyone ever heard of this happening before?
exe crashes when run manually, runs fine within codeblocks
You've got an error somewhere then, like an uninitialised variable or something. I had this before with Dev-C++ and i think it was because i hadn't initialised a wchar_t*, it dealt with it when running in the IDE as the IDE basically did it for me, but the .exe doesn't
So you'll have to track down which part of your code is crashing. I've never really used debuggers but i'm sure they could help you. The way i always do it is by using print statements in my code so i can read off from the console how far through the code my program's got and then i can narrow it down to which line of code is crashing and then investigate what's causing the crash.
So you'll have to track down which part of your code is crashing. I've never really used debuggers but i'm sure they could help you. The way i always do it is by using print statements in my code so i can read off from the console how far through the code my program's got and then i can narrow it down to which line of code is crashing and then investigate what's causing the crash.
Yes, the dll is in the same place as the .exe.
But, I found a couple of pointers that were uniitialized, which I thought could be causing the crash. The problem is, I have a whole bunch of pointers declared from within a class, like so:
Of course, trying to initialize any of these NULL causes an error: only static const integral data members can be initialized within a class.
Are there any ways around this?
But, I found a couple of pointers that were uniitialized, which I thought could be causing the crash. The problem is, I have a whole bunch of pointers declared from within a class, like so:
Code: Select all
class MyWindow: public wxWindow
{
public:
...
...
private:
...
wxNotebook* ToolNB;
wxWindow* EventAnalysisWin;
wxWindow* DetectorWin;
wxWindow* MultimediaWin;
...
};
Are there any ways around this?