On 27/11/15 23:21, luciano de souza wrote:
...
But, if this not works, how to implement the Factory Method in Freepascal?
What about:
var
animal: TDog;
BEGIN
animal := TAnimalFactory.create(atDog);
try
if animal is TDog then
TDog(animal).bark;
finally
animal.free;
end;
Hi,
Is it possible to make the importtl tool work under Linux? Is it just a
matter of defining a bunch of Windows types?
I use Linux for development and cross compile to Windows when needed,
and hence the question. And just to rule out solutions such as 'use the
tool once on Windows to
On 21/06/15 17:46, Marco van de Voort wrote:
In our previous episode, patspiper said:
INPUT(
-l c
)
I think that should be -lc, not -l c. I don't know where the extra
space is coming from in your case.
Exactly!
I have just posted a message with my findings. Which program produces
link.res
The situation is as follows:
- Platform: Windows
- file1.obj: 3rd omf object file (no source available) that can be used
by Delphi linker and calls kernel32.dll functions such as GetTickCount
and GetLastError.
- file1.coff: file1.obj converted to coff format using objconv.exe
On 21/06/15 14:58, Marco van de Voort wrote:
In our previous episode, patspiper said:
Compiling the following simple program (from fpc prog manual
http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46)
yields a linking syntax error:
Is this a bug?
Not of a general kind, since
On 21/06/15 16:40, Jonas Maebe wrote:
On 21/06/15 11:28, patspiper wrote:
Using 'ppc386 -s program1.pp' instead, line 121 of link.res is '-l c' in
the section:
INPUT(
-l c
)
I think that should be -lc, not -l c. I don't know where the extra
space is coming from in your case.
Exactly!
I have
On 21/06/15 14:58, Marco van de Voort wrote:
In our previous episode, patspiper said:
Compiling the following simple program (from fpc prog manual
http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46)
yields a linking syntax error:
Is this a bug?
Not of a general kind, since
The following simple program which uses the $LINKLIB compiler directive
builds fine under Linux:
program Project1;
{$Linklib c}
Const P : PChar = 'This is fun !';
Function strlen (P: PChar): Longint; cdecl; external;
begin
WriteLn ('Length of (',p,') : ',strlen(p))
end.
However,
On 21/06/15 23:58, Jonas Maebe wrote:
On 21/06/15 22:20, patspiper wrote:
So what should be done to remedy the Windows case when $LINKLIB is used,
that is unless $LINKLIB is not to be used with Windows?
{$linklib xxx} can be useful on Windows if you have a DLL that has an
initialisation
On 21/06/15 23:08, Jonas Maebe wrote:
On 21/06/15 21:43, patspiper wrote:
program Project1;
{$Linklib kernel32}
Function GetTickCount: DWORD; external;
begin
WriteLn ('GetTickCount ', GetTickCount);
end.
project1.lpr(10,1) Error: Undefined symbol:
P$PROJECT1_$$_GETTICKCOUNT$$LONGWORD
Hi,
Compiling the following simple program (from fpc prog manual
http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46)
yields a linking syntax error:
program Project1;
{$Linklib c}
Const P : PChar = 'This is fun !';
Function strlen (P: PChar): Longint; cdecl; external;
On 02/05/14 02:22, fredvs wrote:
Hello.
When a java class use a fpc library that call jni.CallVoidMethod inside a
thread it crash the application.
If the fpc library call jni.CallVoidMethod directly (not via a thread) =
perfect, it works.
Is that a known problem ?
Maybe does it exist
On 27/04/14 16:06, fredvs wrote:
Hello wonderful fpc people.
Hum, i want to create a Java wrapper class to access some fpc Java native
libraries.
I have already asked it everywhere, looking in all Java doc, but... without
luck.
Here the unique answer i get (from codeguru.com)
=
Hi,
With the successful preliminary implementation of java events calling
pascal code, my next step is to try to integrate android's visual
controls. Can anyone give a very basic example using pascal/JNI only
(even pseudo code) on how to create and display an android control from
scratch? In
On 24/04/14 15:50, Mattias Gaertner wrote:
On Thu, 24 Apr 2014 15:48:15 +0300
patspiper patspi...@gmail.com wrote:
Hi,
With the successful preliminary implementation of java events calling
pascal code, my next step is to try to integrate android's visual
controls. Can anyone give a very basic
On 25/04/14 00:12, Felipe Monteiro de Carvalho wrote:
There is a JNI example app here:
http://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/bindings/android-ndk/examples/jnitest/
It doesn't create a button, instead it creates a TextView, and it
doesn't create it in Pascal, but in Java. Anyway, it
On 23/04/14 12:31, Felipe Monteiro de Carvalho wrote:
On Wed, Apr 23, 2014 at 6:10 AM, leledumboleledumbo_c...@yahoo.co.id wrote:
Hmm...that's beyond my Java skill. Since Felipe who started the topic, you
can try PM him instead.
So looking at what he originally posted:
On 23/04/14 13:20, Chriss Kalogeropoulos wrote:
Hello everyone,
a couple years ago i tried the same thing. The task was to implement a
JavaPOS driver handler from Delphi/FPC code.
The actual driver was implemented in C++ and it used a Java interface.
My code was the glue between the
On 22/04/14 12:02, leledumbo wrote:
My question is whether it is possible to hook
into (as an example) the java media player events without writing java
code. As for the opposite direction, calling the media player's Start
method from pascal does not need any java code.
If it can be done from
On 22/04/14 18:36, leledumbo wrote:
My question is if it can be done without a java wrapper class as this
would make android programming much easier (unless I have misunderstood
your reply).
Perhaps I misunderstood your question in the first place. Could you instead
draw a diagram (flowchart?)
On 22/04/14 19:26, leledumbo wrote:
Now to the java media player: You assign a pascal method to the
OnCompetion event (the question is how), and start the player
(pascal/jni). Once the song is over, OnCompletion will fire and call the
assigned pascal method.
Ah... I see. That is AFAIK not
Hi,
Is it possible to implement using JNI java events callbacks without
writing java code? For example, the android media player defines:
setOnCompletionListener(MediaPlayer.OnCompletionListener listener)
which registers a callback to be invoked when the end of a media source
has been
On 21/04/14 21:53, fredvs wrote:
Hello.
take a look here :
= http://wiki.freepascal.org/Using_Pascal_Libraries_with_Java
At = Dealing with callback procedures.
The wiki page describes how to interact bi-directionally between your
own java and pascal code. My question is whether it is
On 09/02/14 18:47, Sven Barth wrote:
On 09.02.2014 16:34, Flávio Etrusco wrote:
In other words: dynamic arrays are like AnsiStrings without the
copy-on-write semantics. I'd certainly wish Borland copied the COW
semantics :-/
Dynamic arrays have full COW semantics.
It seems not:
On 23/09/13 10:02, Michael Van Canneyt wrote:
This is wrong. You are typecasting a class reference to an object
instance.
The following works:
{$mode objfpc}
Type
TBaseObject = class(TObject)
public
constructor Create; virtual;
function Clone:TBaseObject;
end;
TBaseObjectClass
On 23/09/13 14:57, Michael Van Canneyt wrote:
On Mon, 23 Sep 2013, Mattias Gaertner wrote:
On Mon, 23 Sep 2013 11:46:54 +0200 (CEST)
Michael Van Canneyt mich...@freepascal.org wrote:
On Mon, 23 Sep 2013, Zaher Dirkey wrote:
On Mon, Sep 23, 2013 at 10:02 AM, Michael Van Canneyt
On 22/09/13 14:38, wkitt...@windstream.net wrote:
On Saturday, September 21, 2013 12:03 PM, patspiper patspi...@gmail.com wrote:
On 21/09/13 18:56, wkitt...@windstream.net wrote:
[...]
i haven't tried that... my understanding is that #xx depicts the decimal
format of the character...
eg
On 21/09/13 12:15, wkitt...@windstream.net wrote:
On Friday, September 20, 2013 12:47 PM, Bart bartjun...@gmail.com wrote:
On 9/20/13, wkitt...@windstream.net wkitt...@windstream.net wrote:
a[n] := #255; // works
a[n] := $ff; // does not work
ideally, there would be multiple bytes...
On 21/09/13 18:56, wkitt...@windstream.net wrote:
On Saturday, September 21, 2013 6:27 AM, patspiper patspi...@gmail.com wrote:
On 21/09/13 12:15, wkitt...@windstream.net wrote:
[trim]
yeah, the singles are bad examples... i'm really wanting the multiple byte
format to work... i tried both
On 17/09/13 15:12, Lukas Gradl wrote:
Hi!
Tried to build the current svn of FPC 2.6.3 (svn Revision 25507) on my
Linux X86_64-box.
I did:
make distclean
make all FPC=Current2.6.3Compiler
sudo make install PREFIX=myprefix FPC=Current2.6.3Compiler
This worked so far, now I have the current
Turn macros on
http://www.freepascal.org/docs-html/prog/progse4.html
Stephano
On 11/05/13 15:14, Geoffray Levasseur-Brandin wrote:
Hi everybody,
I'm trying to make an application that need to be FHS compliant. For that I
want be abble to pass some strings as compile time parameters (eg. the
On 11/05/13 15:31, patspiper wrote:
Turn macros on
http://www.freepascal.org/docs-html/prog/progse4.html
and use not defined instead of undefined
Stephano
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org
On 08/05/13 16:45, Marco van de Voort wrote:
In our previous episode, Jonas Maebe said:
svn) and probably hasn't worked correctly in 10 years or so (if it
ever worked really correctly, given that adding -Xd to OPT never
never
was correct).
It was the best that could be done then.
The best
On 07/05/13 09:33, Jonas Maebe wrote:
No, it goes: nobody ever submitted a bug report about this nor posted anything on
the FPC mailing list and I don't use Windows myself, so this is the first I hear about
it. Problems need to be reported and fixed.
[...]
Every single person using the Mac
Continuation of discussion from Cross-building on from Linux/x86-64 to
Linux/i386 (was: Win64 release of FPC 2.6.2 missing)
On 07/05/13 19:34, Jonas Maebe wrote:
On 07 May 2013, at 18:17, patspiper wrote:
Cross compiler building is broken for FPC 2.7.1 on Ubuntu and Fedora. I had
submitted
On 07/05/13 21:01, Jonas Maebe wrote:
On 07 May 2013, at 19:27, patspiper wrote:
It is the other way round. My OS is 32 bit Ubuntu and one of the targets is
Linux/x86-64, so I assume you mean the 64 bit paths and not the 32 bit ones.
I tried setting CROSSOPT (CROSSOPT=-XR/usr/lib64
-Fl/usr
On 08/05/13 00:01, Jonas Maebe wrote:
Cross compiling for Linux/x86_64 with
FPCMAKEOPT=-Fl/usr/lib/gcc/i686-linux-gnu/4.7 went past the previous error
point, but yet yielded another error:
./fpmake compile --localunitdir=.. --os=linux --cpu=x86_64 -o -Px86_64 -o
-XPx86_64-linux- -o -Xr -o
On 12/04/13 00:11, patspiper wrote:
On 12/04/13 00:08, patspiper wrote:
On 11/04/13 23:25, Marco van de Voort wrote:
In our previous episode, patspiper said:
Cross compilation from Ubuntu 32 bit to Win32, WIn64, and Linux 64
works
well with FPC 2.6.0.
With FPC 2.7.1, any cross compilation
Hi,
Is it possible to build cross binutils to produce win 64 bit files on a
32 bit Linux OS (Ubuntu 32 bit)?
If I set target=x86_64-cygwin, the error is:
'BFD does not support target x86_64-pc-cygwin'
Stephano
___
fpc-pascal maillist -
On 11/04/13 11:33, Sven Barth wrote:
Am 11.04.2013 10:16, schrieb patspiper:
Hi,
Is it possible to build cross binutils to produce win 64 bit files on
a 32 bit Linux OS (Ubuntu 32 bit)?
If I set target=x86_64-cygwin, the error is:
'BFD does not support target x86_64-pc-cygwin'
Why don't
On 11/04/13 14:15, Pierre Free Pascal wrote:
binutils-mingw-w64 package does not exist for Ubuntu 11.04 (my OS),
although it is available in Ubuntu 12.10.
In any case, I have built myself cross binutils for i386/Win32 (cygwin
and mingw32), x86_64/Linux, arm/WinCE, and arm/Linux. As an
On 11/04/13 14:48, Pierre Free Pascal wrote:
So building Binutils with --target=x86_64-w64-mingw32
should work for you.
It does indeed!
As for cygwin 64 bits, it seems that a patch for cygwin 64 support was
applied on 4.3.2013
(http://cygwin.cybermirror.org/64bit/x86_64-pc-cygwin-binutils-
Hi,
I am puzzled by the failure to cross compile with recent FPC versions.
Cross compilation from Ubuntu 32 bit to Win32, WIn64, and Linux 64 works
well with FPC 2.6.0.
With FPC 2.7.1, any cross compilation yields a 'cannot find -lgcc' error.
With FPC 2.6.3, cross compilation to Win32 and
On 11/04/13 23:25, Marco van de Voort wrote:
In our previous episode, patspiper said:
Cross compilation from Ubuntu 32 bit to Win32, WIn64, and Linux 64 works
well with FPC 2.6.0.
With FPC 2.7.1, any cross compilation yields a 'cannot find -lgcc' error.
Linking what file generates that error
On 12/04/13 00:08, patspiper wrote:
On 11/04/13 23:25, Marco van de Voort wrote:
In our previous episode, patspiper said:
Cross compilation from Ubuntu 32 bit to Win32, WIn64, and Linux 64
works
well with FPC 2.6.0.
With FPC 2.7.1, any cross compilation yields a 'cannot find -lgcc'
error
pls ignore
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On 13/12/12 21:51, denisgolovan wrote:
Hi all
Recently I discovered that fpc refuses to use registers in my loops even with
optimization turned on (-O1,-O3 used).
With the asm code commented out and without any optimization, the
registers are used.
.Ll12:
# [47] for i:=1 to 1 do
On 26/11/12 08:09, leledumbo wrote:
2.6(.1) fixes should be compilable only from 2.6.0
Bootstrap compiler 2.6.0:
ftp://ftp.hu.freepascal.org/fpc/dist/2.6.0/bootstrap/
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Hi,
Since a few weeks, I have been unable to build the 2.7.1 cross compiler
(from Linux 32 bit to Win32), while the 2.6.1 cross compiler builds
merrily. My OS is Ubuntu 11.04 32 bits.
What could be wrong?
Stephano
Log (partial):
make packages_smart
On 13/11/12 15:04, patspiper wrote:
Hi,
Since a few weeks, I have been unable to build the 2.7.1 cross
compiler (from Linux 32 bit to Win32), while the 2.6.1 cross compiler
builds merrily. My OS is Ubuntu 11.04 32 bits.
What could be wrong?
Stephano
I forgot to mention
On 19/10/12 23:27, Marco van de Voort wrote:
In our previous episode, patspiper said:
I am able to compile FPC 2.6.1 (rev 22778) under Ubuntu 11.04 32 bits.
However cross compiling to win32 fails with the error: /usr/bin/ld:
cannot find -lgcc
I was able to cross compile successfully about 2
On 20/10/12 15:37, Marco van de Voort wrote:
In our previous episode, patspiper said:
What could have gone wrong?
There were changes merged. I wonder however how a crosscompile to win32 can
reach fastcgi still being target linux.
Could you post your build cmdline please?
revision 22761 cross
Hi,
I am able to compile FPC 2.6.1 (rev 22778) under Ubuntu 11.04 32 bits.
However cross compiling to win32 fails with the error: /usr/bin/ld:
cannot find -lgcc
I was able to cross compile successfully about 2 weeks ago.
The relevant part of the log:
make -C fastcgi smart
make[3]: Entering
On 19/10/12 23:27, Marco van de Voort wrote:
In our previous episode, patspiper said:
I am able to compile FPC 2.6.1 (rev 22778) under Ubuntu 11.04 32 bits.
However cross compiling to win32 fails with the error: /usr/bin/ld:
cannot find -lgcc
I was able to cross compile successfully about 2
On 26/09/12 08:58, Vincent Snijders wrote:
2012/9/25 Berndprof7...@gmail.com:
2012/9/25 patspiperpatspi...@gmail.com:
procedure test;
begin
Move(MyClass1.Ref.Data^, MyClass2.Ref.Data^, 1);
end;
and if you cast it to some other pointer type before dereferencing the
error goes away:
Hi,
Despite
http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields,
shouldn't the following be legal? I tested under FPC 2.6.1 and 2.7.1.
TMyRecord = record
Data: pointer;
end;
TMyClass = class
private
FRef: TMyRecord;
public
On 25/09/12 20:43, Bernd wrote:
2012/9/25 patspiper patspi...@gmail.com:
procedure test;
begin
Move(MyClass1.Ref.Data^, MyClass2.Ref.Data^, 1);
end;
and if you cast it to some other pointer type before dereferencing the
error goes away:
procedure test;
begin
Move(MyClass1.Ref.Data
On 14/09/12 20:07, Ludo Brands wrote:
It is already quite a useful component as is. Since you are FBAdmin's
author, and are knowledgeable in the service API, what do you
recommend
regarding the non basic admin actions? Forced Writes in particular is
interesting as it might have to be turned off
On 13/09/12 16:33, Ludo Brands wrote:
A few questions regarding FBAdmin:
- Will FBAdmin be backported to 2.6.1?
I can't comment on that.
- Will more functionality be added to it? In particular the
setting of
Forced Writes (I could perhaps supply a patch then).
Not from my side. Purpose
On 13/09/12 22:39, Johann Glaser wrote:
@Stephano: Thanks for the link with contributed units. Actually, one
of the USB units is from me, but a bit outdated. When my libusb 1.0
translation (including an OOP wrapper) is done I'll update
http://wiki.freepascal.org/Hardware_Access#libusb and the
A few questions regarding FBAdmin:
- Will FBAdmin be backported to 2.6.1?
- Will more functionality be added to it? In particular the setting of
Forced Writes (I could perhaps supply a patch then).
Stephano
___
fpc-pascal maillist -
On 12/09/12 20:11, Johann Glaser wrote:
Hi!
I'm working on a header translation for LibUSB and its fork libusbx.
They define several data types as C enums (for examples, see
http://libusbx.sourceforge.net/api-1.0/group__desc.html ).
They excessively use direct assignment of enum values, and
On 07/09/12 14:03, Reinier Olislagers wrote:
For my Dutch postcode program https://bitbucket.org/reiniero/postcode
with an embedded Firebird 2.5 database, I allow users to read in a CSV
file with new or updated postcode data.
I use sqldb, FPC x86.
I'd like to get your suggestions on speed
On 09/04/12 17:28, Alan Krause wrote:
Indeed. You can put the following in your .bashrc file:
export LD_LIBRARY_PAH=.
Not recommended security wise, especially that it is needed for testing
only.
Stephano
___
fpc-pascal maillist -
The following is related to bug #0021680:
The idea is to let libraryB intercept calls to libraryA.
1- How can this be accomplished in Linux?
Using ordinals would have been a way, but Linux does use them.
Another venture (to be tested yet) may be dynamic loading of libraryA.
2- Does this
On 08/04/12 23:12, Jonas Maebe wrote:
On 08 Apr 2012, at 21:56, patspiper wrote:
The following is related to bug #0021680:
The idea is to let libraryB intercept calls to libraryA.
1- How can this be accomplished in Linux?
Using ordinals would have been a way, but Linux does use them
Is it possible to test a shared library compiled with Lazarus/FPC under
Linux without copying that library to /usr/lib or fiddling with the OS
configuration to locate them?
Under Windows, it is enough to have the testing executable (host
application) in the same folder as the shared library.
On 06/03/12 11:00, michael.vancann...@wisa.be wrote:
On Mon, 5 Mar 2012, Bart wrote:
Hi,
Brought up in Lazarus forums.
Fpc Trim(): Trim whitespace from the ends of a string.
Delphi Trim(): Trims leading and trailing spaces and control
characters from a string.
Depends on what you mean by
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On 10/26/2010 10:18 AM, leledumbo wrote:
make[4]: /home/me/Programs/fpc/cross_fpc/cross/bin/i686-cygwin-as:
Command not found
The error is very clear, do you have the assembler in the indicated
directory? Make sure the result of building binutils have i686-cygwin-
prefix. Otherwise,
On 10/26/2010 05:48 PM, Jonas Maebe wrote:
On 26 Oct 2010, at 16:38, patspiper wrote:
i686-mingw32-as is present in the crossbinutils bin folder. But the
error concerns i686-cygwin-as...why would it ask for the assembler
with a i686-cygwin prefix?
Because that's probably the version
I use the scripts buildcrossbinutils.sh and buildcrosssnapshot.sh to
buils the FPC 2.4.2 cross compiler (linux to win32). However when I do
the same steps but with FPC 2.5.1, I get the following error:
make all LINKSMART=1 CREATESMART=1
make[4]: Entering directory
On 10/17/2010 05:54 AM, Andrew Brunner wrote:
I've got a class factory problem I'm trying to resolve and it appears
I'm at a point where it's probably better to ask for help.
TCoreObjects=class;
TCoreObject=Class (TPersistent)
protected
class procedure VerifyIDs(var
On 08/21/2010 01:20 PM, Nataraj S Narayan wrote:
Hi
I don't NEED a help, paid or unpaid.
Your first email mentions explicitly the need for help:
On 08/20/2010 10:41 AM, Nataraj S Narayan wrote:
Hi
May I have some help in this code ? I am on arm-linux-uclibc.
Compiling using :-
snip
On 08/21/2010 07:44 AM, Nataraj S Narayan wrote:
Jonas
I was expecting exactly this response from you.
I did'nt ask you to volunteer to help me. If you don't find time, or
feel it wasting your time, let somebody else do it. Issue is very much
real and i tried out your suggestions without
Anthony Walter wrote:
Okay, I am going to call bullshit on you.
I, like many others in this list, resent your unwarranted behavior
towards Michael Van Canneyt.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
76 matches
Mail list logo