Mail Archives: djgpp/1996/01/09/19:06:55
In article <Pine DOT LNX DOT 3 DOT 91 DOT 960108163815 DOT 29099B-100000 AT noether DOT nyongwa DOT montreal DOT qc DOT ca>,
dunder <dunder AT nyongwa DOT montreal DOT qc DOT ca> wrote:
>
>We are currently making a relatively big program in C++. We wrote it in
>Turbo C++. We arranged it so it could be compiled within GCC (dj's) (ie
>arranging the random() pow(long, long) and itoa() [wich we had to redo
>;)] but it seems that GCC doesn't support it. It compiles well, without
>warnings but the executable doesn't work (its NOT a renamed COFF file ;))
>It bugs 'at start'. Go32 v1.11.maint4 reports:
>
>Segment violation in pointer 0x00000000 at d8:de81
>
>It works fine compiled with TC... Is this error sent by a particular bug
>en DJGPP or by some 'TC supported' functions or syntax that GCC handles
>badly? Thanx
You're looking for a bug in the wrong place. The bug isn't in djgpp,
the bug is in your program. At some point in your program you are
dereferencing a NULL pointer. Turbo C didn't catch the bug because
there is no memory protection in real mode. Turbo C will let you smash
the interrupt table with reckless abandon.
The easiest way to find the bug is to use the debugger. It should be
able to tell you where the error happened.
Eric
--
Eric Korpela | An object at rest can never be
korpela AT ssl DOT berkeley DOT edu | stopped.
<a href="http://www.cs.indiana.edu/finger/mofo.ssl.berkeley.edu/korpela/w">
Click here for more info.</a>
- Raw text -