[fpc-pascal] Re: Help needed with interfacing to C-object-files.

Koenraad Lelong fpascal at brouwerij.homelinux.net
Sat Mar 19 20:10:16 CET 2005


Koenraad Lelong wrote:
> Koenraad Lelong wrote:
> 
>> Jeff Pohlmeyer wrote:
...
> I'm trying this and it seems to work, partly.
> I wrote a clone in fpc of the temp-program, and encountered some strange 
> things.
> The library successfully detects the interface, and one device (only one 
>  connected at the time). But when the serialnumber of the device is 
> written with the library-function, this does not work. I wrote a routine 
> in fpc to write 8 bytes (=serialnumber) to the screen in hex, and then 
> the serialnumber of the connected device is written on the screen. So 
> the communication-part seems to work.
> What I did see is that after I stop the application there is extra text 
> on the screen. This contains the serialnumber of the device. When I 
> comment out the library-calls to write the serialnumber, this is gone.
> Is it possible that fpc 'monopolises' the standard output, and after the 
> program terminates, the text, written with c-routines while the program 
> was running, finally apears on the screen ?
> Second question : are c-double types and fpc-double types compatible ?
> Last question to Jeff Pohlmeyer : could you explain how you made that 
> unit ? Did you convert all h-files with h2pas, and merged them ?
> I ask this because that 'library' deals with serial devices (ttyS*). I 
> have a similar one, for USB-devices. I would like to make a unit for 
> this also.
> 
> Thanks,
> Koenraad.
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

I'm trying to debug this problem. I installed gdb, and ddd. But I can 
only debug the fpc-program. Can't go into the c-code (I compiled this 
with -ggdb).
Has anyone experience with this ? Any suggestons ?
TIA,
Koenraad.




More information about the fpc-pascal mailing list