Re: [fpc-pascal] Array of Char

2005-08-18 Thread John Coppens
On Thu, 18 Aug 2005 07:24:46 +0200
"Carsten Bager" <[EMAIL PROTECTED]> wrote:

> 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'; 

without the parenthesis should work.

John

___
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-18 Thread Lowell C. Savage
I would also have thought that with all the object formats that GCC emits, 
that one of them would be the object format used by VC, in which case using 
VC's linker would work.


However, I was able to get a DLL compiled that I could link up and run 
(without getting an error that the DLL was missing when the program started.)


I hope to get some time in the next few days to put together a simple 
tutorial/sample showing how to do it.


Thanks Marco, for the help!

Lowell
Tomas Hajny wrote:

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


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 libraries under Windows

2005-08-18 Thread Tomas Hajny
Date sent:  Thu, 18 Aug 2005 11:48:32 -0600
To: fpc-pascal@lists.freepascal.org
From:   "Lowell C. Savage" <[EMAIL PROTECTED]>
Subject:Re: [fpc-pascal] Linking Pascal code to C/C++ static 
libraries
under Windows
Send reply to:  FPC-Pascal users discussions 




> I would also have thought that with all the object formats that GCC
> emits, that one of them would be the object format used by VC, in
> which case using VC's linker would work.

Well, I didn't think about this path (compiling FPC program to MS 
object file format and using the MS linker), although _in_theory_ 
this might be an option too by using one of external assemblers 
supported in FPC which would be capable of creating the required 
object format (e.g. NASM?) for MS linker (I'd expect even more 
problems there, though).


> However, I was able to get a DLL compiled that I could link up and run
> (without getting an error that the DLL was missing when the program
> started.)
> 
> I hope to get some time in the next few days to put together a simple
> tutorial/sample showing how to do it.

Glad to hear that you have succeeded.

Tomas

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