Re: [fpc-pascal] Writing a compiler

2009-01-06 Thread leledumbo

I decided to go with Coco/R Delphi (http://tetzel.com/CocoR/). Has anyone
managed to compile it with FP? There's a weird bug in StringTools.pas unit,
which I think is a bug of FP.

There's only one unit in the uses clause, which is Graphics. After
converting the source with Lazarus, compilation gives "circular unit
reference between CocoAGI and StringTools".

I try removing StringTools from CocoAGI uses clause, now it gives another
one "circular unit reference between StringTools and Graphics".

Graphics doesn't have uses clause, so how could it happen?
-- 
View this message in context: 
http://www.nabble.com/Writing-a-compiler-tp21285931p21307025.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Using FPC MM in a C program

2009-01-06 Thread Micha Nelissen

leledumbo wrote:

Since it's possible to use libc's MM via cmem unit, would the opposite be
possible?


I have a "crtl.pas" which defines a few functions (malloc, calloc, free, 
memmove, memcpy) to help in using libraries written in C with fpc 
programs without needing external dependencies (msvcrt.dll on windows, 
for some reason that did not work for me).


However, it's a all-or-nothing situation. A program uses either this 
crtl unit, or it links a C library like msvcrt.dll or something similar; 
using both is asking for trouble.


Micha
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Writing a compiler

2009-01-06 Thread Marco van de Voort
In our previous episode, leledumbo said:
> 
> I decided to go with Coco/R Delphi (http://tetzel.com/CocoR/). Has anyone
> managed to compile it with FP? There's a weird bug in StringTools.pas unit,
> which I think is a bug of FP.

Start by renaming the duplicate unit names (at least crt and probably crc
too) to something else.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Library Project raises Linker Error Hints at -fPIC option

2009-01-06 Thread Andrew Brunner
I'm looking for a reason why I get this error while linking a compile
of a Shared Object I'm building under x64 (Ubuntu).

BinUtils 2.19 (Started with 2.18) but 2.19 did not fix problem.
FPC 2.2.3 (1/6/2009)
Lazarus SVN RVN :17967 0.9.27 beta

Error while building.

/usr/local/bin/ld:
libpuMatrixMemoryThread.a(uMatrixMemoryThread0s8.o): relocation
R_X86_64_32S against `TC_UMATRIXMEMORYTHREAD_EVENT_ITEM_NUMBER' can
not be used when making a shared object; recompile with -fPIC


-

The assignable typed constant is declared inside the localized unit
file.  It's not global but it's right after the implementation
declaration

implementation

Const
  Event_Item_Number  : DWORD   = 1;


-

Can anyone tell me why this would be a problem or what I need to do to
get FPC to build or LD to link properly?  I've added the -fPIC option
to pass to the linker in Lazarus but to no avail  Please help...

Thanks.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Writing a compiler

2009-01-06 Thread leledumbo

> Start by renaming the duplicate unit names (at least crt and probably crc
too) to something else.

Thanks, Marco. Just as I thought, that would be the problem. It compiles
fine now.
But shouldn't the compiler message be more informative? I usually get
"duplicate unit found" or something, which IMO should be the correct one.
-- 
View this message in context: 
http://www.nabble.com/Writing-a-compiler-tp21285931p21324028.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Part of OOo Linux is written in FPC?

2009-01-06 Thread leledumbo

I've read this in a discussion forum somewhere, is it true?
-- 
View this message in context: 
http://www.nabble.com/Part-of-OOo-Linux-is-written-in-FPC--tp21324694p21324694.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal