Re: [fpc-pascal] Re: How to use fpcmake

2009-04-27 Thread Graeme Geldenhuys
2009/4/26 Guillermo Martínez Jiménez gmji...@burdjia.com:

 It compiles but when I run ./fpmake archive it returns a lot of
 Warning: source file * not found for * but they actually exists(!).

I actually have no idea how to add include files. The example Henry
created only sets up the include paths, but not include files for
'archive' functionality.

I browser the sources and noticed there is Sources.Add(), but I'm not
sure if that will do the trick.
eg:
   T := P.Sources.AddSrc('filename_here');


 Can somebody help me to understand it?

Michael?  Any idea how to use the 'archive' feature of fpmake?


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: How to use fpcmake

2009-04-27 Thread Michael Van Canneyt


On Mon, 27 Apr 2009, Graeme Geldenhuys wrote:

 2009/4/26 Guillermo Martínez Jiménez gmji...@burdjia.com:
 
  It compiles but when I run ./fpmake archive it returns a lot of
  Warning: source file * not found for * but they actually exists(!).
 
 I actually have no idea how to add include files. The example Henry
 created only sets up the include paths, but not include files for
 'archive' functionality.
 
 I browser the sources and noticed there is Sources.Add(), but I'm not
 sure if that will do the trick.
 eg:
T := P.Sources.AddSrc('filename_here');

There is also:

procedure TSources.AddSrcFiles(const AFileMask: string; Recursive: boolean);

It does a search and adds all files.

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

Re: [fpc-pascal] Re: How to use fpcmake

2009-04-27 Thread Henry Vermaak
2009/4/26 Guillermo Martínez Jiménez gmji...@burdjia.com:
 From: Graeme Geldenhuys graemeg.li...@g...
 Subject: Re: [fpc-pascal] How to use fpcmake

 Hi Guillermo,

 I struggled with it as well. Henry Vermaak then created an example for
 me and showed how to use it. The example he did was for the fpGUI
 Toolkit project.

 I did read Vermaak's example and I've found some documentation at the
 wiki (http://wiki.lazarus.freepascal.org/FPMake) but I can't
 understand it. That's the program I wrote:

i'm sorry my example is a bit crap, never got round to do it properly.
 it's best if you work off something in the fpc sources.  for example
in packages/mysql/fpmake.pp there is this:

T:=P.Targets.AddUnit('mysql3_com.pp');
  with T.Dependencies do
begin
  AddInclude('mysql3_comtypes.inc');
  AddUnit('mysql3_version');
end;

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


[fpc-pascal] COM interfaces support in FPC 2.2.2 Win64

2009-04-27 Thread Eric Grange
I'm trying to compile a small executable in Win64 that makes use of the 
IFilter interface.


Registry read accesses are okay, the CoCreateInstance on IFilter and 
QueryInterface for an IPersistFile on the IFilter instance pass with ok 
results, but the first use of the interface (an IPersistFile.Load) dies 
with a RunError(1).
This is using the fpc 2.2.2  ActiveX that comes with Lazarus (where 
IPersistFile is defined).


Is COM support functional in 2.2.2 Win64? Are there known issues?

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


[fpc-pascal] RECORD alignment issue on Mac OS X intel based

2009-04-27 Thread Roland Turcan
Hello FPC-Pascal users discussions!

I am posting the same request to this mailing list and I posted into
lazarus.

Thanks for any answer in advance.

TRoland;

 Hello Dmitry,

 Thanks for your reply, but I think, that you haven't understood me
 what I am trying to explain.

 I have binary contents which are copied from memory using by an
 application which is written in Delphi. I am porting an application to
 MacOS X 10.5, but I need to use the same structures as I have in
 Delphi and Kylix where NOT PACKED records are aligned.

 The fact is, that FPC compiler on intel based Mac OS X builds up
 application which contains records packed by 4 bytes by default.

 I need to get the same behavior in intel based mac os x as I have in
 other platforms.

 What should I do to build FPC compiler which will behave the same on
 all platforms.

 TRoland;

  27.4.2009 17:04 - dmitry boyarintsev skalogryz.li...@gmail.com 
db use:
db   TYPE TMyOne = packed record
db   First:integer;
db   Second:extended;
db END;
db to be sure about 20 bytes boundary.

db thanks,
db dmitry


db Hello All,
db
db I have found some new information about this problem:
db
db 1.
db
db TYPE TMyOne =record
dbFirst:integer;
dbSecond:integer;
db  end;
db
db ... then the size of this object is 2*4 bytes.
db
db 2.
db
db TYPE TMyOne =record
dbFirst:integer;
dbSecond:double;
db  END;
db
db ... where I would expect 4 + 8 bytes = 12 bytes
db ... but the size of this object is 16!
db
db
db 3.
db
db TYPE TMyOne =record
dbFirst:integer;
dbSecond:extended;
db  END;
db
db ... where I would expect 4 + 16 bytes = 20 bytes
db ... but the size of this object is 32!
db
db
db So this proves me, that compiler tries to align the data structure to
db multiplied size of biggest element to which fit all elements.
db
db I have understood this behavior, but this happens me in these cases:
db
db 1. Delphi 7
db 2. Kylix 3
db 3. Lazarus on Ubuntu
db 4. Lazarus on PowerPC Mac OS X 10.5
db
db but on Intel Based Mac OS X 10.5 Mini with Intel Duo 2 Core it
db DOESN'T. Therefore I have problems with parsing of binaries back to
db memory.
db
db I don't expect CPU specific problem, otherwise it would not work
db active projects, therefore I think it must be compiler specific
db problem.
db
db Do you have any idea?
db
db Thanks in advance.
db
db Greetings, TRoland;
db
db
db  25.4.2009 9:43 - Roland Turcan k...@rotursoft.sk 
RT Hello Diettrich,
db
RT To tell the truth this code and style I got from previous developer
RT and I really don't know why he decided to get the size of header from
RT the binary instead of getting its size. The fact is, that this
RT optimistic variant of coding is on many places. :-|
db
RT TRoland;
db
RT  24.4.2009 19:56 - Hans-Peter Diettrich drdiettri...@aol.com 
HPD Roland Turcan schrieb:
db
 BB How is HeaderLen declared ?
 
 Stream.Read (HeaderLen, SIZEOF (HeaderLen));
 
 where information header's length is stored into binary.
db
HPD The you should verify that HeaderLen = SizeOf(FHeader), before
HPDStream.Read (FHeader, HeaderLen);
db
HPD Otherwise this statement will overwrite the following FItem data, with
HPD the fatal consequences you already experienced.
db
HPD When a header will ever change in size (or structure), it's wise to 
HPD store a version number in the data files. Then you can read the stored
HPD header data into the exactly applicable header type (record), and 
HPD convert that record into the current THeader definition, field by field.
db
HPD DoDi


-- 
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk

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


Re: [fpc-pascal] COM interfaces support in FPC 2.2.2 Win64

2009-04-27 Thread Bart
Not sure if this is related, but 2.2.2 has a bug in setting properties via COM.

It should be resolved in 2.2.4

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


Re: [fpc-pascal] RECORD alignment issue on Mac OS X intel based

2009-04-27 Thread Jonas Maebe


On 27 Apr 2009, at 17:34, Roland Turcan wrote:


The fact is, that FPC compiler on intel based Mac OS X builds up
application which contains records packed by 4 bytes by default.

I need to get the same behavior in intel based mac os x as I have in
other platforms.


If you do not specify any packrecords setting, the compiler can do  
whatever it wants with the internal alignment of the record (and this  
can be different not only between different platforms, but also  
between different compiler versions). If you want a particular layout,  
use a particular packrecords setting ({$packrecords 1} with manual  
padding is probably the safest). See also http://wiki.freepascal.org/User_Changes_Trunk#Alignment_of_record_variables


One reason that it can be different on different platforms, is that  
the alignment of some types may be defined differently by the ABI  
(e.g., the Mac OS X/i386 ABI defines the alignment of double variables  
as 4 bytes, while on most other ABIs it's 8 bytes).



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


Re: [fpc-pascal] COM interfaces support in FPC 2.2.2 Win64

2009-04-27 Thread Marco van de Voort
In our previous episode, Bart said:
 Not sure if this is related, but 2.2.2 has a bug in setting properties via 
 COM.
 
 It should be resolved in 2.2.4

As far as I know the winunits-base package had more than an handful other
fixes also.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Greetings

2009-04-27 Thread Nino Luciani
Hi guys,

A quick introduction. I joined the FPC mailing lists yesterday.

Regards,
Nino Luciani

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


Re: [fpc-pascal] Greetings

2009-04-27 Thread Doug Chamberlin

Nino Luciani wrote:

Hi guys,

A quick introduction. I joined the FPC mailing lists yesterday.


Hi, Nino! Welcome!

Are you new to the Object Pascal world or have you been using the 
language for a while?


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


Re: [fpc-pascal] Greetings

2009-04-27 Thread Lou James
I am new here too,I've been using free pascal since a year and a half
ago.And I'm wondering what I can contribute?

On 27/04/2009, Doug Chamberlin dougchamber...@earthlink.net wrote:
 Nino Luciani wrote:
 Hi guys,

 A quick introduction. I joined the FPC mailing lists yesterday.

 Hi, Nino! Welcome!

 Are you new to the Object Pascal world or have you been using the
 language for a while?

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



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


[fpc-pascal] Apache Modules without LResources

2009-04-27 Thread Giovanni Premuda

Hello,
I'm in the process of converting a relatively complex LMS from Delphi to 
fpc.
In Delphi I was using a descendant of TCustomWebDispatcher instead of a 
TWebModule in order to avoid depending on DFM resources.
Is it possible to use fclweb without linking LResources and a lazarus 
resource file?

Thanks ,

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