[fpc-pascal] Freepascal 2.0 for cygwin

2005-08-16 Thread Jose Pascual
Hi there,

Is there some 2.0 fpc release for cygwin? 
If no, How can I build it starting from the scratch?

tia!

best regards


___
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-16 Thread Peter Vreman
 Hi there,

 Is there some 2.0 fpc release for cygwin?
 If no, How can I build it starting from the scratch?

There is no release. If you want to start a cygwin special the best way is
to start with a unix target and adapt it for cygwin. Things like opening
files etc. all need to be done through the cygwin1.dll so using the win32
rtl can not be used for that.




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


Re: [fpc-pascal] Writeln in embedded systems

2005-08-16 Thread Jonas Maebe


On 15 aug 2005, at 15:06, Carsten Bager wrote:


I have been experimenting with compiling to an embedded
ARM platform I succeeded in compiling with a minimum
system unit.
Now the ARM processor can blink with a LED.
I then tried to put in a Writeln just to se what library modules
there was missing. I then get this error:
(I want to connect a display)
---
Hint: End of reading config file fpc.cfg
Free Pascal Compiler version 2.0.0 [2005/05/15] for arm
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for ARM
Compiling led.pas
led.pas(33,3) Fatal: Internal error 200107271
led.pas(33,3) Error: Compilation aborted


Line 33 is the line where I have written WriteLn('TEST');

Dos anyone have a hint about what I should do next.


Add the writeln helpers (FPC_WRITE_*) to your system unit. See rtl/ 
inc/text.inc



Jonas


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


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

2005-08-16 Thread Lowell C. Savage

Background:

I have an old DOS console program that I'm trying to resurrect to run on 
Windows XP.  There isn't much about the structure of the program that I 
need (or want) to change.  But the interfaces to hardware will have to 
change.  It uses the old PORT array to communicate to the Serial port and 
a similar mechanism to communicate to an add-in board.


To work under XP, my understanding is that the old memory mapping stuff 
will no longer work.  So, we got a newer, equivalent A/D board which comes 
with a library of interface functions.  We have figured out how to replace 
the old interface code with newer calls to wrapper functions written in 
C.  (The original author did a VERY good job of structuring the code to 
isolate the interfaces!)


So the new structure is:

Application.pas, App1.pas, App2.pas, ..., AppBdIF.pas

Wrapper.c

Interface1.lib, Interface2.lib

Where AppBdIF.pas calls functions in Wrapper.c which in turn makes 
calls into Interface1.lib and Interface2.lib.  The ideal would be to 
compile Wrapper.c and the two InterfaceX.lib files into a Wrapper.lib 
which contains everything.  Then, I link Application.pas to all the other 
.pas files and to Wrapper.lib and I'm done.


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.  However, then the interface functions are undefined because I can't 
get the linker to see the Interface.lib files that contain them.  I've 
tried setting up my wrapper module as a DLL  but haven't had much luck 
there (I suspect the problem is that I'm not correctly creating the DLL in 
the first place since I can't get another test C program to link to it.)


Any suggestions?

Thanks in advance!


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] Freepascal 2.0 for cygwin

2005-08-16 Thread Jose Pascual
Is there some posibility to make (compiling) fpc without fpc?
Is there some makefile or script in fpc (cvs) to avoid to use a fpc
1.0.0 or 2.0.0 to create a fpc new version?


  Hi there,
 
  Is there some 2.0 fpc release for cygwin?
  If no, How can I build it starting from the scratch?
 
 There is no release. If you want to start a cygwin special 
 the best way is to start with a unix target and adapt it for 
 cygwin. Things like opening files etc. all need to be done 
 through the cygwin1.dll so using the win32 rtl can not be 
 used for that.
 


___
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-16 Thread Vincent Snijders

Jose Pascual wrote:

Is there some posibility to make (compiling) fpc without fpc?
Is there some makefile or script in fpc (cvs) to avoid to use a fpc
1.0.0 or 2.0.0 to create a fpc new version?





IIRC, fpc 1.0.0 can be made with turbo pascal 7.

Vincent.

___
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-16 Thread Jonas Maebe


On 16 aug 2005, at 20:24, Jose Pascual wrote:


Is there some posibility to make (compiling) fpc without fpc?


No.


Jonas

___
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-16 Thread Matt Emson
 Is there some posibility to make (compiling) fpc without fpc?
 Is there some makefile or script in fpc (cvs) to avoid to use a fpc
 1.0.0 or 2.0.0 to create a fpc new version?

Cygwin runs exclusively on Windows machines... FPC has a Windows port.
Whilst I can see the point of a port to Cygwin, I seriously can't understand
why you can't use the Windows compiler to bootstrap the compiler. Cygwin is
just a bunch of DLLs and support binaries at the end of the day, and
creating a minimal bootstrap implementation using the Windows compiler,
whilst not trivial, is the simplest way of doing it. Am I missing some
reason for not using the Win32 compiler?

By the way, how would one compile Pascal code without a Pascal compiler? No
magic script file will avoid the need for fpc.


___
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-16 Thread Jose Pascual
Okey, 
but I think that the first stage for make fpc is to compiling some asm
or c files using binutils, right?
so in cygwin I have binutils, even gcc, how I shoud to do to create
first fpc from ASMs or Cs files?


 
 On 16 aug 2005, at 20:24, Jose Pascual wrote:
 
  Is there some posibility to make (compiling) fpc without fpc?
 
 No.
 
 
 Jonas


___
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-16 Thread Jonas Maebe


On 16 aug 2005, at 21:44, Jose Pascual wrote:


Okey,
but I think that the first stage for make fpc is to compiling some asm
or c files using binutils, right?


No, FPC is entirely written in Pascal (just like gcc is written in C  
and not in assembler). The original bootstrap was with Turbo Pascal,  
but TP compatibility has been dropped a long time ago. It must be  
bootstrapped with itself now.



so in cygwin I have binutils, even gcc, how I shoud to do to create
first fpc from ASMs or Cs files?


You can't, you have to cross-compile it with an existing version of  
FPC (the Win32 version is most logical in your case)



Jonas


___
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-16 Thread Marco van de Voort
[ Charset ISO-8859-1 unsupported, converting... ]
 Jose Pascual wrote:
  Is there some posibility to make (compiling) fpc without fpc?
  Is there some makefile or script in fpc (cvs) to avoid to use a fpc
  1.0.0 or 2.0.0 to create a fpc new version?
 
 IIRC, fpc 1.0.0 can be made with turbo pascal 7.

In practice Only by developers, due to all kinds of tricks needed to deal with 
the low memory amount.

___
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-16 Thread Marco van de Voort
 Okey, 
 but I think that the first stage for make fpc is to compiling some asm
 or c files using binutils, right?

Incorrect.

 so in cygwin I have binutils, even gcc, how I shoud to do to create
 first fpc from ASMs or Cs files?

You can't, FPC is written in pascal.


___
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-16 Thread L505

 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 ?





___
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-16 Thread L505

 No, FPC is entirely written in Pascal (just like gcc is written in C
 and not in assembler). The original bootstrap was with Turbo Pascal,
 but TP compatibility has been dropped a long time ago. It must be
 bootstrapped with itself now.

Neato.. offtopic but if anyone wondered, the delphi compiler is
originated from borland C++ as far as my tools told me.


___
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-16 Thread Nikolay Nikolov

L505 wrote:


Neato.. offtopic but if anyone wondered, the delphi compiler is
originated from borland C++ as far as my tools told me.
 

Yes, actually DCC32 is written in C++. Only the Delphi IDE is written in 
Delphi. FPC and Lazarus are both written in FPC :)


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