| John,
Lets see if I can get this stuff straight...
To use your 68881 you can
#include <math.h>
compile normally, and link with lcmieee.lib and lcm.lib
For 'inline' 881 code
#include <m68881.h> /* and probably <math.h> */
compile with the -f8 switch and link with lcm881.lib and lcm.lib
** Remember, the order of linking is very important. This screwed
me up also. You'll want to search the 'specific' library first,
and then use the default library (lcm.lib) for any routines not
included in the 'specific'.
If you are doing the compile/link in one shot you'll
want to specify the libraries in a reverse (searching) order.
In english, this means that the libraries you want searched first
will be specified last. Ie.
$ lc -O -m2 -Lm+lib:lcmieee.lib foo
$ lc -O -m2 -f8 -Lm+lib:lcm881.lib foo_inline
If you are using Blink directly, then specify them in the order you
want them to be searched in. Ie.
$ blink FROM lib:c.o+foo.o TO foo LIB lib:lcmieee.lib+lib:lc.lib+amiga.lib
$ blink FROM lib:c.o+foo.o TO foo LIB lib:lcm881.lib+lib:lc.lib+amiga.lib
To use the FFP stuff just compile with the -ff switch and link with
the lib:lcmffp.lib. Don't link with lcm.lib, since it uses the IEEE
format, and not the ffp format.
That should solve your problems,
Steve
|