PDA

View Full Version : fmod and freepascal



{MSX}
06-11-2004, 09:35 AM
I'm having problem with fmod and freepascal. Have anyone managed to compile it ?



nicola@mother:/fat/cosebele/fmod$ fpc fmodtest.dpr
Free Pascal Compiler version 1.9.4 [2004/08/12] for i386
Copyright (c) 1993-2004 by Florian Klaempfl
Target OS: Linux for i386
Compiling fmodtest.dpr
Compiling fmod.pas
Compiling fmodtypes.pas
fmod.pas(767,11) Error: Asm: [fldcw reg16] invalid combination of opcode and operands
fmod.pas(781,1) Fatal: There were 1 errors compiling module, stopping


I i remove the (unused, afaik) procedure in line 767, i get:



nicola@mother:/fat/cosebele/fmod$ fpc fmodtest.dpr
Free Pascal Compiler version 1.9.4 [2004/08/12] for i386
Copyright (c) 1993-2004 by Florian Klaempfl
Target OS: Linux for i386
Compiling fmodtest.dpr
fmodtest.dpr(3,2) Warning: APPTYPE is not supported by the target OS
Compiling fmod.pas
Linking fmodtest
/usr/bin/../lib/libfmod.so: undefined reference to `__divdi3'
fmodtest.dpr(51,1) Error: Error while linking
Closing script ppas.sh

BenBE
06-11-2004, 06:51 PM
I guess that FreePascal needs to be told to use Delphi ASM Style. Try including a $MODE-directive for Delphi-Mode. Then the ASM should do.

The second message is because of the APPTYPE-Directive that tells Delphi that a console program is to be written. Consult the docs of Freepascal of how to write console programs on Linux. IDK as I use neither FreePascal nor Linux.