[fpc-devel] First version of FPC for iPhone SDK 2.x available
Jonas Maebe
jonas.maebe at elis.ugent.be
Sat Jan 10 12:01:07 CET 2009
On 10 Jan 2009, at 11:21, dmitry boyarintsev wrote:
> 1) While building the template, i've met only one problem: 'gles11'
> unit used by fpclogo.pas could not be found. I've added a path to
> "opengles" package checked to /etc/fpc.cfg and project compiled and
> run with no problems. Really nice!
I don't understand, you should not need any such path. /etc/fpc.cfg
always contains:
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/*
$fpcversion is 2.3.1 and $fpctarget is either i386-darwin (simulator)
or arm-darwin (real hardware). The gles11 unit is installed by the
post-install script into /usr/local/lib/fpc/2.3.1/units/i386-darwin/
opengles (resp. arm-darwin).
Do you perhaps have an .fpc.cfg in your home directory that contains
other unit search paths? Maybe I should modify the Xcode compilation
scripts to ignore any configuration files, and hardcode the paths (via
an option, so you can still change the path to point elsewhere, if you
want). That would prevent such problems.
> tested for Simulator 2.0
>
> #/etc/fpc.cfg sample. I've iPhone SDK installed to /Developer
> ...
> -Fu/Developer/FreePascalCompiler/iPhoneSnapshot-2.3.1-r12531/Source/
> packages/opengles/*
Those are the sources. You should not have to add this at all.
> I wonder if obj-c 2.0 run-time is available at iPhone/iPod devices, so
> it's possible to compile with out ObjC code at all.
It is perfectly possible to compile programs without using Objective-C
code (the testsuite programs, which are plain command line programs,
work fine on the iPhone/iPod Touch -- of course, their output only
appears on the console log and not on the screen, because they don't
have a GUI).
However, it is against the iPhone SDK agreement to distribute
derivative works, and this is includes Pascal translations of
framework headers. So it would be quite a challenge (if possible at
all) to create and distribute the sources of a complete Pascal program
with a GUI that does not violate the iPhone SDK agreement terms at
this time. See the ReadMe.rtf file for more information.
> And of cause using
> Lazarus instead of XCode can save a LOT of time :)
Afaik that is impossible at this time, because I know of no way other
than Xcode to copy an application to the iPhone/iPod Touch and to
execute it. It should be possible to modify Lazarus to work with the
Simulator, if you wish to figure that out. Personally, I have however
no intention to work on that.
> 2) Also a note. While switching between Simulator target versions
> (i.e. 2.0 -> 2.1), the project refuses to build:
> ----
> Building target "iPhoneFPC" of project "iPhoneFPC" with configuration
> "Release" — (1 error)
> cd /Users/igorkokarev/gdb-768/src/gdb/macosx/iPhoneFPC
> /bin/sh -c
> /bin/sh: -c: option requires an argument
> /bin/sh: -c: option requires an argument
> /bin/sh: -c: option requires an argument
> Build failed (1 error)
> ----
I cannot reproduce this. Please provide the full build transcript. You
can obtain it by clicking on the third icon at the bottom of the pane
with the output above (the one that looks like some text lines, next
to the yellow warning triangle).
This error means that Xcode cannot find the assembler code for a
compiled Pascal unit. I'll add a proper error message in the next
version.
Jonas
More information about the fpc-devel
mailing list