Mail Archives: djgpp/1999/02/12/11:04:04
> I have installed the v2 package og DJGPP, and small trivial programs =
> like "Hello world" works.
Excellent! That means a lot of things are working.
> Now, I need to run a bigger program, which works on other machines
> (eg code correct, my teacher made it).
>
> C:\dokumenter\matk\nummetoder>gcc -c kap1jh.c
OK, what you need to do is recompile all your sources with "-g", like this:
gcc -g -c kap1jh.c
When you get your .exe file, run it in the debugger (gdb) like this:
gdb kap1jh.exe
(gdb) run
...
... crashes
(gdb) where
The "where" command will tell you where it was when it crashed. You
can use the "print" or "info locals" commands to try to find out why.
For more information on using gdb (you really should learn to use it
if you're using djgpp to write programs), type "info gdb" at the dos
prompt, or see:
http://www.delorie.com/gnu/docs/gdb/
- Raw text -