Hello everybody,
I'm working on a wrapper of a C library. I've found a bug, but I
can't debug it with GDB because if I compile with "-g" and link with
the debug version of the library it works correctly.
But if I compile with "-g" and link with the release version of the
library, I can't debug i
Thanks, Henry,
> Can you give any more information about how it fails?
It's a "SIGSEGV". The library is the Allegro library version 5.0.6.
The error is inside an internal procedure that uploads a texture to
OpenGL context, and it is used by other Allegro functions (i.e.
loading pictures from fi
> From: Henry Vermaak
> Subject: Re: [fpc-pascal] Re: Runs correctly when debugging.
>
> It's hard to say without seeing your function/type declarations.
Actually I don't call the function that raises the SIGSEGV signal,
since it's an internal function. Allegro has a "driver" struct
(RECORD) that
> No, you have to use pchar. I would also define ALLEGRO_BITMAP as an
> empty record, to be clear that it's an opaque type:
>
> {$packrecords c}
> TAllegroBitmap = record
> end;
> PAllegroBitmap = ^TAllegroBitmap;
>
> Thus:
>
> function al_load_bitmap(const filename: pchar): PAllegroBitmap; cde
Hello everybody,
Has somebody used Free Pascal 2.6 in DOSbox?
I'm having problems with the installer (text looks corrupted and it
doesn't install) but I don't know if it's an issue in all DOSbox or
it's because I'm using it in a 64bit Linux (Xubuntu 12.04).
Greetings,
Guillermo "Ñuño" Martínez
_
From: Reinier Olislagers
> Just for interest: are you trying out FPC for DOS for fun or do you need
> to create/support DOS (not Windows) programs?
I think I'm trying it just for fun. Actually I was angry because my
Allegro.pas wrapper doesn't work (well, version 4.4 almost do but version 5
only
> On 12 Sep 2012, at 19:11, Johann Glaser wrote:
>
>> Can I translate this 1:1, i.e., define an Enum in Pascal and just ignore
>> the compiler warnings about reused values?
>>
>> Or should I rather define all these types as Integer and define
>> constants for all values?
>
> It depends on whether y
A new version of Allegro.pas was released yesterday. Allegro.pas is a
wrapper to allow Pascal compilers (such as Free Pascal) to use the
Allegro library in games or multimedia programs.
This version introduces new functions that allows to create, write and
read files using the LZSS compression alg
Hello.
I was looking in the maillist archive but I didn't find an answer.
Did somebody planned to compile, test and release FPC for the Pandora
handgeld game console? (www.openpandora.org)
I will try to buy one when it comes to be available (pre-order on
September 30) so if nobody else will I wo
2008/9/16 Jonas Maebe <[EMAIL PROTECTED]>:
>
> On 16 Sep 2008, at 15:36, Guillermo Martínez Jiménez wrote:
>
>> Did somebody planned to compile, test and release FPC for the Pandora
>> handgeld game console? (www.openpandora.org)
>
> I've not heard of anyone
Thanks for your messages.
By the way, I've read at Free Pascal's download site that there's two
ARM versions for the compiler, one of them is for Linux. Pandora will
use a Linux distro (www.freepascal.org/down/arm/linux.var). Does
somebody use that one?
Guillermo "Ñuño" Martínez
_
> From: Florian Klaempfl
>
> I've only one arm box so I can't work well on oabi and eabi. My box
> still runs oabi (multi boot is not possible with the Thecus). If someone
> offers me reliable access to a fast >=500 MHz, >=128 MB eabi box, some
> GB HD, I'll fix the needed stuff.
>
Unfortunately I
> Would translating/porting linux to pascal be possible ?
Possible? Yes it is. Worth of...? I'm afraid not.
By the way, Linux is good as it is now and Pascal isn't the best
option to create an operating system.
Guillermo "Ñuño" Martínez
___
fpc-pasc
> Are you sure?
Yes, I am.
> doesn't older MacOS's versions where written in Object Pascal?
Yes, it does, but as I said I think it wasn't the better options.
> I think the problem here (again) is not the language, it's the critical mass
> of users of the language. Using C for Linux was a good
Hello.
I'm trying to link a library written in C (Allegro 4.2) on Linux. The
testing program (which is minimal) links without problems but it
raises a runtime error:
#~/test: ./test
./test: symbol lookup error: /usr/local/lib/liballeg.so.4.2: undefined
symbol: _blender_trans24
#~/test:
I've emai
ay. I somebody finds another workarround, please tell me.
Greetings.
Guillermo Martinez.
>
> On 10 Feb 2009, at 19:30, Guillermo Martínez Jiménez wrote:
>
>> I tried to link that library using "{$linklib alleg_unsharable}". It
>> linked without error but it raises the
>
> Link time error, I guess. But according to your original message, the name
> of the library is liballeg_unshareable.a. So you would have to use -k
> liballeg_unshareable.a, not "-klalleg_unshareable.a". The linker only
> prepends "lib" if you use "-k-lalleg_unshareable.a" (note the extra "-").
> Perhaps I missed it, but are you sure you declared the
> functions/procedure in the library you are using cdecl?
> That would explain a runtime error instead of linker error.
I'm sure I've used "cdecl" to declare the procedure I'm using to test it.
By the way, Allegro's developers confirm me th
> From: Jonas Maebe
>
> Maybe the problem is that the default FPC config file enables symbol
> stripping. So even though the routines from the library are in your
> program, dynamically loaded libraries won't be able to find them since
> the symbol names are gone. Try compiling the program with -Xs
Hi.
I've tried your suggestion about the symbol stripping and had the same
result. Thanks anyway.
I'll load the library manually.
> From: Jonas Maebe
>
>>> Link time error, I guess. But according to your original message,
>>> the name
>>> of the library is liballeg_unshareable.a. So you would ha
2009/2/21 Jonas Maebe
>
> On 21 Feb 2009, at 19:35, Guillermo Martínez Jiménez wrote:
>
>> I've tried your suggestion about the symbol stripping and had the same
>> result.
>
> Did you also disable smart linking? (-XX-)
>
I didn't.
Is
Right now I can load the library manually, using "dynlibs" unit. I'll
work that way. Thanks.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> From:
> Dear FPC forum,
>
> I am a total novice to FPC.
>
> I am using fpc-2.2.2.i386-win32 on XP
>
> Compiling Bounce.pp
>
> I Get the message: "Can't find unit GL used by bounce"
>
> Please: Where do I go from here ?
>
> Thank you,
>
I'm not sure but may be the OpenGL are optional on Windows i
Hi.
I did read the documentation, I look for more information on the
Internet and I've read some Makefile.fpc files on the FPC sources, but
I can't create a Makefile.fpc file for my project. I can't understand
most of the options and the project is pretty complex: it's a package
that includes a bu
This is an old note. I forgot to post it. Few days ago I released the
second Alpha of Allegro.pas 4.3.0
Allegro.pas is a wrapper to allow Pascal programmers to use the
Allegro game library (http://alleg.sourceforge.net/).
This new version introduces support for GNU/Linux (at cost drop drop
the D
> From: Graeme Geldenhuys
>
> 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.
>
>Usage:
> - Compile fpmake.pas as follows:
> fpc fpmake.pas
>
> -
Hello.
I'm using
I need to reserve dynamic memory to store raw binary data. I tried the
next code:
fSize := aObject^.size;
GetMem (fData, fSize);
Move (aObject^.dat, fData, fSize);
Both "fData" and "dat" are untyped POINTER but the program returns an
"Segment violation" at the Move procedu
Hello.
I'm using FPC 2.2.2 on Xubuntu 8.10.
I need to reserve dynamic memory to store raw binary data. I tried the
next code:
fSize := aObject^.size;
GetMem (fData, fSize);
Move (aObject^.dat, fData, fSize);
Both "fData" and "dat" are untyped POINTER but the program returns an
"Segment vi
> From: Graeme Geldenhuys
> 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
> Both are .dat and fdata are points. IOW you are moving "fsize" bytes from
> the place where the 4 byte of the pointer dat is stored to the place where
> the 4 bytes of the pointer fdata is stored. Since you probably move more
> than 4 bytes you totally corrupt what is behind "fdata" in memory.
>
Hello.
I'm working on a project that needs the GLX library. It compiles but
when running it returns that error:
./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined
symbol: glXQueryExtension
In other forum a colleague suggest that it doesn't links with the
libglx.so . I'm trying t
Hello.
I'm working on a project that needs the GLX library. It compiles but
when running it returns that error:
./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined
symbol: glXQueryExtension
In other forum a colleague suggest that it doesn't links with the
libglx.so . I'm trying t
Jonas Maebe wrote:
> -klglx (note the extra "l").
I tried that:
fpc -02 -Sh -FUlib/ -klglx /exbasic.pp -oexbasic
But it returns that error:
/usr/bin/ld: lglx: No such file: No such file or directory
I look for a dev package for GLX (libgl1-mesa-glx-dev?) but I can't
find it. Which packages sho
Michalis Kamburelis wrote:
>Note also your error message:
>
> ./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined
> symbol: glXQueryExtension
>
> This says something strange, the linker for some reason is looking for
> glXQueryExtension inside libagl.so. What exactly is
> /usr/loca
> From: Zachary Marlow
> Subject: Re: [fpc-pascal] GRAPHICS HELP : PLEASE PLEASE
> To: FPC-Pascal users discussions
> Message-ID: <491787.41572...@web35505.mail.mud.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Well =
>
> =A0=A0=A0=A0=A0 Like How to draw a circle , I just ne
I've uploaded two now releases of Allegro.pas.
Allegro.pas is a wrapper to use Allegro with Pascal compilers (Delphi,
Free Pascal, etc). Allegro is a cross-platform library intended for
use in computer games and other types of multimedia programming.
The new release (4.4.0 Alpha2) fixes a bug, ad
There are an error in my last message. The actual Allegro.pas'
project website is at http://allegro-pas.sourceforge.net/
Sorry
Guillermo "Ñuño" Martínez
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/li
Hello everybody.
My message is for both "Why use pointers to arrays?" and "Illogical
automatic deferencing".
I really don't understand why Pascal "should" include C-style stuff.
PASCAL IS DIFFERENT LANGUAGE THAN C. STOP. Actually I hate that
"C-lovers" that think all languages must use C-style st
> From: J?rgen Hestermann
>
> (...) but Borland created these Pascal
> "extensions" and now we cannot go back (as others say) because we need
> compatibility with Delphi programs and an "easier" (which I doubt)
> convertion of C header files. So noone is willing to turn back the clock
> and remove
> From: Marco van de Voort
> (...)
> The reason is probably more because Wirthian languages traditionally use
> recursive descent parsers.
This reminds me: there are a compiler generator named COCO/R wich has
a Pascal version (Delphi actually). It generates recursive descendent
parsers. ( search r
Hello.
A coincidence. Today at Club Delphi (Spanish community of Delphi
developers) some body commented about Pascal Served Pages, which aims
to create a server that allows to use Pascal as script language in a
similar way than PHP. Actually the project is 'dead' (last release
date is November 200
> procedure TfrmHometel.SetSplitterSizes;
> var
> i: integer;
> begin
> for i:=3D 0 to ComponentCount - 1 do
> begin
> if Components[i] is TSplitter then
> begin
> with TSplitter(Components[i]) do
> begin
> if Cursor =3D crHSplit then
> Width :=3D 7
> else if Cursor
> Date: Wed, 21 Jul 2010 16:55:14 -0300
> From: Marcos Douglas
>
> How you have no conflict with names of the units? Do you use some
> prefix in your units as "uwebutils.pp", "mywebutils.pp",
> "xyzWebUtils.pp", etc.
I do use descriptive names, of course. I also use a "Unit" or "U"
prefix; i. e.:
Hello,
FPC is returning the "Warning: cdecl’ared functions have no high
parameter" but I have no idea why. The documentation just says
"Functions declared with the cdecl modifier do not pass an extra
implicit parameter." but the affected functions don't have any "extra
implicit parameter".
I'm u
Oh, I see. It has sense. The "extra implicit parameter" part
confused me because I didn't use OOP in that project.
Thank you :)
2012/3/1 :
> From: Sven Barth
> Subject: Re: [fpc-pascal] Weird compilation warnings
>
> Am 29.02.2012 22:53, schrieb Guillermo
Hola gente.
Además de congratularme por la existencia de esta lista de correos, os
escribo para daros a conocer este proyecto en el que llevo metido
desde hace ya un año.
Se trata de Allegro.pas, que busca crear una envolvente para poder
utilizar la librería Allegro con compiladores Pascal. Alleg
Hello everybody.
Recently I asked myself if Free Pascal has support for ncurses and
I've found it as an extra package.
I've take a peek at the ncurses.pp file and I've found it uses a lot
of external functions. That means this package will not compile on
platforms that haven't a previous ncurses
On Fri, 18 Jan 2008, Michael Van Canneyt wrote:
>CgpPbiBGcmksIDE4IEphbiAyMDA4LCBHdWlsbGVybW8gTWFydMOtbmV6IEppbcOpbmV6IHdyb3Rl
>OgoKPiBIZWxsbyBldmVyeWJvZHkuCj4gCj4gUmVjZW50bHkgSSBhc2tlZCBteXNlbGYgaWYgRnJl
> ...
Er... Pardon?
___
fpc-pascal maillist - f
Hi.
Recently I discovered that Delphi can detect [Ctrl]+C keys using the
EControlC exception. I was curious so I decided to test it in Linux
using Free Pascal. The program I wrote:
_
PROGRAM ExControlC;
(* How to capture [Ctrl+C] in Object Pascal. *)
{$mode objfp
Esteemed Skybuck,
I've read your messages and I think you didn't understood what Free
Pascal is (or may be I didn't understood your questions).
Free Pascal is an Object Pascal compiler, like Delphi, so it's mostly
compatible with it but they're quite different since FP doesn't
include a RAD IDE n
May be you can use the Wine library. It is a library created to help
porting applications from Windows to *NIX. Visit www.winehq.org
Regards.
Ñuño Martínez.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/l
Hello.
I'll create a library in Object Pascal. I'll compile it in a
DLL/so/dynlib and want to define a public interface to be used in any
language so I decided to define it as "C public functions".
I'll use objects so some functions of the library should return or
receive object references but I'
Hi.
> The SDL2 documentation recommends you to register constants with:
>
> Uint32 SDL_RegisterEvents(int numevents);
>numevents = the number of events to be allocated.
>Returns the beginning event number, or (Uint32)-1 if there are not
> enough user-defined events left.
>
> The SDL_Regi
El Sun, 25 Jun 2023 13:42:00 -0300
Rafael Picanço via fpc-pascal
escribió:
> Thanks Guilhermo,
You welcome. :)
>
> Just to clarify, I do have a limited number of events. Lets say, 2
> events. So, using the SDL_RegisterEvents function, is it possible to
> define these two new events as normal co
Hi,
I'm not sure but I think that CPU caches (L1, L2...) have some impact
on this example. Also I think PChar assignation should use string
copy instead (Strings.strcopy). Not time to do my own tests right now
though u_u) .
Regards,
Guillermo "Ñuño" Martínez
El Tue, 4 Jul 2023 11:46:42 +0700
H
Hi Pascaloids,
I'm wondering if it is possible to make FPC detect and warn (or even
stop compillation when) it has detect a nested comment. That's because
I'm using Vim and it closes odd comments. For example, the nex code:
{ This comment isn't closed. *)
DoSomething ();
{ This is a nested co
El Sun, 21 Jan 2024 17:12:05 +0100
Tomas Hajny via fpc-pascal escribió:
> Well, I guess that you use mode Delphi, because warning about nested
> comments and even an error in your case (due to nested comment not
> closed) is already issued by default. So the very simple solution is
> using e.g
El Sun, 21 Jan 2024 17:27:15 +0100
Adriaan van Os via fpc-pascal
escribió:
>
> ($modeswitch nestedcomments-}
>
I didn't know about this switch. Thanks, maybe I can use it.
Guillermo Martínez J.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.
Hi Pascaloids,
I was looking for the FP IDE sources to check how it renders the ASCII
table and manage the mouse input, but I'm not able to find them.
They're not in GitLab, not in the source packages, not in the download
pages. Lazarus Wiki has two pages "Textmode IDE" and "Textmode IDE
developme
Thanks, Karoly and Marco.
I thought "packages" were libraries not applications, as there is an
"utils" directory with programs.
Thankyou again,
Guillermo Martínez.
El Wed, 13 Mar 2024 22:45:19 +0100
Marco van de Voort via fpc-pascal
escribió:
> Op 13-3-2024 om 21:34 schreef Karoly Balogh via fp
Prease DON'T add garbage collector. IMO it isn't a good idea. I had
very bad experiences with it. Unless somebody found a new magic
algorithm in the last decade...
El Wed, 16 Oct 2024 04:49:44 -0700
Hairy Pixels via fpc-pascal escribió:
> On Oct 16, 2024 at 4:44:35 PM, Nikolay Nikolov via fpc-p
Use FPC from command line is easy if you're not using the LCL (the
Lazarus Component Library).
If you're using the LCL they explained in the other answers, but if you
just use the RTL then the easiest way is just calling FPC from the
same directory you have the sources:
~$ fpc theprogram
That wi
Seeing the error line (FItems: ^TArray;) I think it's fpdoc's
fault. Seems that it doesn't recognize it as a specialization and gets
confused by finding a '<' character out of place (from it's point of
view).
El Fri, 7 Feb 2025 11:05:01 -0800
ppadilcdx--- via fpc-pascal escribió:
> Was trying
63 matches
Mail list logo