Re: [fpc-pascal] Freepascal 2.0 for cygwin

2005-08-17 Thread Michael Van Canneyt



On Tue, 16 Aug 2005, L505 wrote:




By the way, how would one compile Pascal code without a Pascal

compiler? No

magic script file will avoid the need for fpc.


I asked this question on C2 wiki once..
I guess you could start by hardcoding a binary program from scratch in a
text editor with your bare hands. Then you have the meaning of life,
birth, the big bang, creation, etc.

Did FPC originate from a turbopascal compiler, or a Gnu C compiler? Or
bare assembly? or bare binary ?


The initial version was compiled with Turbo Pascal.

Later FPC was used to recompile itself. Now you would no longer be able
to compile FPC using FPC, because it uses classes, which TP didn't
support.

When going to a new platform, you'll always need to cross-compile.
But this is the same for any C compiler.

Michael.

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


Re: [fpc-pascal] Freepascal 2.0 for cygwin

2005-08-17 Thread Matt Emson

> When going to a new platform, you'll always need to cross-compile.
> But this is the same for any C compiler.

And, as Cygwin is simply another target under Windows, the Windows compiler
is perfectly capable of "cross" compiling for Cygwin. In this case, "cross"
compiling is streatching the term slightly, as Cygwin is another API that
runs under Windows, not a seperate OS. The hardest part will be tweaking the
RTL and working out which Cygwin DLL provides which section of the UNIX API.
It's not trivial, but it's a far cry from porting to, say ARM from X86 or
68000 to PowerPC or from Linux to QNX or BeOS. At least your binaries should
run under Windows without having to reboot, so long as the Cygwin DLL's are
in the path.

M


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


[fpc-pascal] Pascal-Compiler under Linux

2005-08-17 Thread Thomas Zastrow

Hello,

I try to write a little article about Pascal-programming under Linux. As 
I now, Kylix, FPC and the GNU Pascal Compiler can be used to develope 
Pascal-applications under Linux. Are there any more working 
Pascal-Compiler for Linux?


Thanx,

Tom


--
-
http://www.thomas-zastrow.de


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


Re: [fpc-pascal] Pascal-Compiler under Linux

2005-08-17 Thread Marco van de Voort
> 
> I try to write a little article about Pascal-programming under Linux. As 
> I now, Kylix, FPC and the GNU Pascal Compiler can be used to develope 
> Pascal-applications under Linux. Are there any more working 
> Pascal-Compiler for Linux?

Afaik no maintained ones.

Virtual Pascal (which stopped development) has an half finished port.

Maybe some smaller ones, see also the canonical pascal compiler list:

http://www.pascaland.org/pascall.htm

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


Re: [fpc-pascal] Linking Pascal code to C/C++ static libraries under Windows

2005-08-17 Thread Lowell C. Savage

Marco, replying to me, wrote in part:

> The Problem:
>
> The problem is that I can't seem to figure out how to get FPC to link to
> static libraries.  FPC's linker won't look for the "Wrapper.lib".  It
> either wants "Wrapper.dll" or "Wrapper.lib.dll".  I can compile wrapper.c
> to an object module (in Visual C 6.0) and FPC will link to that object
> file.

FPC is link compatible with GCC, not with VC. IOW, recompile your sources
with GCC.


I can only do that for a small part (the wrapper C code that I wrote).  The 
main libraries were done by another company and they have the source--not 
me.  I didn't understand the part about link compatibility--thanks, that 
helps!  Now that I do, I know anything other than a DLL is a dead end, at 
least with FPC.


Another possibility might be to use Delphi for the Pascal side.  Any 
thoughts?  It sounds like there are a few people on this list who have some 
experience with Delphi.  Would I be able to compile my TP code (with 
perhaps minor mods) and link it to Win32 static libraries for which I only 
have the compiled libraries and header files?


Thanks!


Lowell C. Savage
[EMAIL PROTECTED]
505-667-6964 (office/msg)
360-961-8965 (cell/msg)
505-667-4341 (shared fax)  




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


Re: [fpc-pascal] Linking Pascal code to C/C++ static librariesunder Windows

2005-08-17 Thread Tomas Hajny
Lowell C. Savage napsal(a):
> Marco, replying to me, wrote in part:
>> > The Problem:
>> >
>> > The problem is that I can't seem to figure out how to get FPC to link
>> to
>> > static libraries.  FPC's linker won't look for the "Wrapper.lib".  It
>> > either wants "Wrapper.dll" or "Wrapper.lib.dll".  I can compile
>> wrapper.c
>> > to an object module (in Visual C 6.0) and FPC will link to that object
>> > file.
>>
>>FPC is link compatible with GCC, not with VC. IOW, recompile your sources
>>with GCC.
 .
 .

Out of curiosity - is this limitation related to different object library
format used/supported by GCC and VC, or yet something else? If it's just
the format, there might be tools to translate from one format to another
(although there might be limitations, of course), or it _might_ be
possible (with some manual tweaking - for sure not easy) to use a linker
supporting both formats (I'd expect OpenWatcom Linker to be able to do
it)...

Tomas


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


[fpc-pascal] Array of Char

2005-08-17 Thread Carsten Bager
We are moving from another Pascal compiler where this is
allowed.
--
Type
  txt_typ=packed array[0..1] of char;

Const
  txt1:txt_typ=('12');
--

Is there a way around this without having to write

  txt1:txt_typ=('1','2');



Another thing, with the old compiler we can write

Type
  A_typ=array[0..3] of integer;
Var
 A1,A2:A_typ;

Begin
  If A1=A2 then
End;

I have never could understand when this is allowed
A1:=A2;

Why this is not allowed
If A1=A2 then

in most Pascal compilers.

Regards Carsten

--
Carsten Bager
Bøvlingbjerg El-automatik
Brørupvænget 10
7650 Bøvlingbjerg
Tlf. +4597885222 Fax +4597885434
http://www.beas.dk


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