Re: [fpc-pascal] For Slackware users

2014-05-04 Thread Yann Mérignac
No problem to add this link. If FPC and/or Lazarus teams are interested, I can also provide binary packages for FPC and/or Lazarus (I can't host them myself). But I'm not sure there are many users of pascal and Slackware... ___ fpc-pascal maillist - f

Re: [fpc-pascal] why constructor of TObject is NOT virtual but destructor is?

2014-05-04 Thread Sven Barth
Am 05.05.2014 08:04 schrieb "Sven Barth" : > > Am 05.05.2014 04:13 schrieb "Xiangrong Fang" : > > > > 2) What is the purpose of making destructor of TObject virtual? > > The destructor needs to virtual so that the correct one is called no matter what static type a variable has. Imagine you have a T

Re: [fpc-pascal] override or virtual override

2014-05-04 Thread Sven Barth
Am 05.05.2014 05:09 schrieb "Xiangrong Fang" : > > Hi All, > > Is the property of "virtual" inherited? i.e. if a method in parent class is virtual, same method in child class is also virtual, right? > > TBase = class > public > destructor Destroy; override; //<-- is this enough > destructor Des

Re: [fpc-pascal] why constructor of TObject is NOT virtual but destructor is?

2014-05-04 Thread Sven Barth
Am 05.05.2014 04:13 schrieb "Xiangrong Fang" : > My questions are: > > 1) if the above understanding is correct AND COMPLETE, why the constructor of TObject is not virtual? What problem will appear IF we make it virtual? Virtual constructors are basically only needed if you want to create an objec

[fpc-pascal] override or virtual override

2014-05-04 Thread Xiangrong Fang
Hi All, Is the property of "virtual" inherited? i.e. if a method in parent class is virtual, same method in child class is also virtual, right? TBase = class public destructor Destroy; override; //<-- is this enough destructor Destroy; virtual; override; //or this to ensure it is still virtua

[fpc-pascal] why constructor of TObject is NOT virtual but destructor is?

2014-05-04 Thread Xiangrong Fang
Hi All, I would like to know the benefit of making constructor / destructor virtual. As described here: http://c2.com/cgi/wiki?VirtualConstructor The benefit of virtual constructor seems related to "class reference". As far as I understand, it is related to how LCL works, like: CreateComponent

Re: [fpc-pascal] warning about hiding method in ancestor class

2014-05-04 Thread Sven Barth
On 04.05.2014 16:46, Xiangrong Fang wrote: Hello All, I have a unit here: https://github.com/xrfang/pastats/blob/master/src/units/datalist.pas which report this error: /home/xrfang/git/pastats/src/units/datalist.pas(61,17) Warning: An inherited method is hidden by "constructor TDataFrame.Crea

Re: [fpc-pascal] For Slackware users

2014-05-04 Thread Tomas Hajny
On Sun, May 4, 2014 18:24, Yann Mérignac wrote: Hi, > I have modified my scripts to convert FPC & Lazarus binaries to Slackware > packages. > > If you're interested you can find them to > http://yann.merignac.free.fr/fpc-and-lazarus-for-slackware.html Would it be OK if we add this link to the F

Re: [fpc-pascal] problem with the opengl unit

2014-05-04 Thread Mattias Gaertner
On Sun, 4 May 2014 14:40:35 +0200 YuGiOhJCJ Mailing-List wrote: > This is where fpc is searching: > $ fpc -vt bounce.pp | grep "unit path" > Using unit path: /usr/lib/fpc/2.6.4/units/i386-linux/rtl/ > Using unit path: /usr/lib/fpc/2.6.4/ These are the default unit paths of the compiler. It norma

[fpc-pascal] For Slackware users

2014-05-04 Thread Yann Mérignac
Hi all, I have modified my scripts to convert FPC & Lazarus binaries to Slackware packages. If you're interested you can find them to http://yann.merignac.free.fr/fpc-and-lazarus-for-slackware.html ___ fpc-pascal maillist - fpc-pascal@lists.freepascal

Re: [fpc-pascal] problem with the opengl unit

2014-05-04 Thread leledumbo
> Do you know why the unit path is "/usr/lib/fpc/2.6.4/" instead of "/usr/lib/fpc/2.6.4/units/"? No, but I did have problems with that many -Fu lines, which is why I reduce to just two: -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/* -Fu~/.fppkg/lib/fpc/$fpcversion/units/$FPCTARGET/* And it wo

[fpc-pascal] warning about hiding method in ancestor class

2014-05-04 Thread Xiangrong Fang
Hello All, I have a unit here: https://github.com/xrfang/pastats/blob/master/src/units/datalist.pas which report this error: /home/xrfang/git/pastats/src/units/datalist.pas(61,17) Warning: An inherited method is hidden by "constructor TDataFrame.Create;" However, the following code, which also

Re: [fpc-pascal] problem with the opengl unit

2014-05-04 Thread YuGiOhJCJ Mailing-List
This is where fpc is searching: $ fpc -vt bounce.pp | grep "unit path" Using unit path: /usr/lib/fpc/2.6.4/units/i386-linux/rtl/ Using unit path: /usr/lib/fpc/2.6.4/ I am wondering if it is correct because that is what I have in this last directory: $ ls /usr/lib/fpc/2.6.4/ ide msg ppc386 samp

Re: [fpc-pascal] problem with the opengl unit

2014-05-04 Thread leledumbo
> So there is really a problem with my GL (or gl) unit. > If this is only a problem of upper case, can you tell me how I can fix it? I think it's rather a unit path problem. Compile with -vt and grep -i "unit path" Make sure it lists path to your opengl units. If it doesn't, then check your fpc.

Re: [fpc-pascal] problem with the opengl unit

2014-05-04 Thread YuGiOhJCJ Mailing-List
Indeed, I found an example in /usr/share/doc/fpc-2.6.4/opengl/examples/bounce.pp. $ fpc bounce.pp Free Pascal Compiler version 2.6.4 [2014/05/03] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Linux for i386 Compiling bounce.pp bounce.pp(14,3) Fatal: Can't find unit gl

Re: [fpc-pascal] problem with the opengl unit

2014-05-04 Thread Reimar Grabowski
On Sat, 3 May 2014 20:48:02 +0200 YuGiOhJCJ Mailing-List wrote: > I am not looking for learning OpenGL, I just want a minimal example to be > sure that my OpenGL unit is working correctly. > Do you have something like that? There should be some in fpcsrcdir/packages/opengl/examples/. hih R. __