[Lazarus] Cross compiling LCL win32=>win64; update wiki?

Sven Barth pascaldragon at googlemail.com
Sun Feb 19 13:28:07 CET 2012


On 19.02.2012 13:22, Reinier Olislagers wrote:
>>> 3) Unrelated... I can take this to the FPC list as well..
>>> The FPC manual, chapter 5 on -Txxx, says you can find out supported
>>> compilers using -i; for me (FPC 2.7.1):
>>> cd \development\fpc
>>> fpc -i
>>> it shows e.g. Win32 for i386, but not win64.
>>> However, calling ppcrossx64 -i does show Win64 for x64.
>>> 2 questions:
>>> 3.1) Am I interpreting the docs incorrectly? I thought fpc would spit
>>> out the info for all compilers it has in its directory.
>>
>> You are interpreting this correctly. Using -P you tell the fpc binary
>> which compiler to call which will inturn print it's info (it's the same
>> output you'd achieve if you'd call the ppc* binary with -i yourself).
>> This is by design (note: calling fpc without -P will simply call the
>> default compiler binary for the platform fpc was compiled for)
> Ok, that's clear.
>
>>> 3.2) How do I go from the description, e.g. "OS/2 via EMX" to the
>>> required -T setting, e.g. -Tos2?
>>
>> It might be better to call FPC with -h then and fetch all lines starting
>> with -T (this has the same platform restrictions as the -i variant)
>
> My regex skills are not that good, but
> fpcdev -h | grep "^      \-T"
> already gives good results, thanks.

Your tools is written in Pascal? Then you could just read the output of 
"fpc -h", Trim() every line and check whether Pos('-T',line) is 1. If 
that is the case then you can process that line (no need for regular 
expressions here ^^). [though using regular expressions in FPC isn't 
that complicated ;) ]

Regards,
Sven





More information about the Lazarus mailing list