[fpc-pascal]Re: Strange Concept

Michael Van Canneyt michael.vancanneyt at wisa.be
Thu Nov 9 17:21:17 CET 2000


On Thu, 9 Nov 2000, md wrote:

> Free pascal community:
> 
> Peter Vreman responded that there is a problem getting pascal compiled
> code to be used by code compiled by GNU C.

This is correct.

> 
> Please confirm that any code compiled under pascal is not usable by code
> in GNU C.

This is not entirely true.

> 
> No ability to link object file?   test.o

Possible.

> No ability to create shared library?  libtest.so

Createable, but not always usable.
it is _NOT_ usable in following circumstances:
 - Use of the heap in a library.
   (can be remedied by using the CMem() unit, which uses the C heap manager)
 - Units with initialization code.
 - Writing to standard input/output. 
 
A library that does not use any of the above is possible.

e.g. someone made a library containing UDF's for the
Interbase SQL server in a shared library, for string functions.
it works without problems.
 
> No ability to create static library?  libtest.a

Same applies here.

The problem is that the unit initialization is not carried out
by C libraries. We are working on this; a solution is known, but
must be implemented and tested.

Michael.





More information about the fpc-pascal mailing list