Mail Archives: djgpp/1998/01/12/04:32:23
On 12 Jan 1998, Luke wrote:
> I downloaded djgpp just a few days ago, so am fairly new at it. I have a
> bunch of files that I made with Microsoft C++, and when compiled, they
> worked fine under that. But when I got them compiled under djgpp and tried
> to run it, I got some sort of floating point exception, and signal
> SIGFPE.
This program has a bug that triggers the FP exception. If you have
the sources for that 3D library, look at Panel3D::CalcNormal() and try
to figure out what bombs there. The traceback seems to suggest you
are trying to use garbage as an FP number (not every binary pattern is
a legal FP number), but that's a wild guess. If you don't have the
sources, disassembling (e.g., inside a debugger) near EIP=34F1h should
at least tell you which operation caused the exception.
Since the program loads a file, one reason for the crash might be that
this file is a binary file which contains floating point numbers. If
so, you should review the code that reads the file and make sure that
you don't load garbage into FP variables. For example, if the file
was created by writing structures (BAD idea), make sure the
declaration of the structure in DJGPP is compatible with the MSC
version (check 16-bit vs 32-bit ints, struct member alignment, etc.).
If you cannot fix the sources or the inputs that cause this, you might
consider using the library function `_control87' to mask off the
numeric exceptions at the beginning of `main'. But I really suggest
to understand the reason for this problem before you decide which
solution is appropriate.
> Also, when I run make, it says something like
> (makefile:4) : *** seperator missing
This *is* in the FAQ (section 22.15).
> that may not sound weird, but line 4 is:
> cc -c test.exe $(objects)
This line should begin with a TAB, not a bunch of spaces.
- Raw text -