When using FBIDE, I compile and run my windows program it runs, and crashes.
I think what causes it to crash is it cannot find a file or files.
But when I click on the program file in a folder, it runs properly, and does not crash.
I tried reinstalling FBIDE, but no luck.
What is going on here?
Any ideas?
Program crahes from FBIDE, but not from clicking on it.
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
Re: Program crahes from FBIDE, but not from clicking on it.
Maybe it's a problem with the working directory it runs in from FBIde.
Either way, if you modify your Run command as documented in http://www.freebasic.net/forum/viewtopi ... =2&t=19950, you'll be able to see whatever message comes up when the program quits.
Either way, if you modify your Run command as documented in http://www.freebasic.net/forum/viewtopi ... =2&t=19950, you'll be able to see whatever message comes up when the program quits.
Re: Program crahes from FBIDE, but not from clicking on it.
Don't know why that helps, but it doesn't seem to be crashing from the fbide now.
Go figure.
Go figure.
Re: Program crahes from FBIDE, but not from clicking on it.
I think that counting_pine is referring to these two points of FBIde settings:lassar wrote:Don't know why that helps, ...
counting_pine wrote:- Compiling with -exx
This enables the largest possible amount of error checking, aborting the program on things like problems opening files, or going out of bounds on an array.
Compiler command:"<$fbc>" "<$file>" -exx
counting_pine wrote:- Leaving the command line window open when the program finishes
This basically consists of wrapping the Run command in "cmd /c [Run command] & pause", which opens up a command window which does the Run Command, and then run Pause to wait for a keypress before closing. This is a good alternative to putting Sleep at the end of a console program, and also stops the window closing if the program aborts with an error, allowing you to see the message returned. So it's good to use with '-exx' (not so useful with '-s gui').
Run command:This will work on any version of Windows that uses cmd, e.g. Windows 2000/XP. I haven't tested on Vista/7, but there is a report of it working on 7, so both are probably fine.cmd /c "<$file>" <$param> & pause