At 12:15 +0200 1/7/05, Frank Heckenbach wrote:
Peter N Lewis wrote:
gpc -c --interface-only peterQ.pas gpc -c --implementation-only peterQ.pas
gpc thinks the object defined in the interface is not
methods-always-virtual.
Why do you think so? The messages say it has a virtual method.
This warning is suppressed with --mac-pascal, not with --methods-always-virtual in case you mean this.
At 16:02 +0800 1/7/05, Peter N Lewis wrote:
peterQ.pas: In method `MyObject.Destroy': peterQ.pas:17: error: argument 1 to `Dispose' must be a pointer
This is the indication - it is indicating the obj is not considered a pointer suitable for use in new.
Note that with the example given,
gpc -c peterQ.pas
works, but:
gpc -c --interface-only peterQ.pas gpc -c --implementation-only peterQ.pas
fails with an error.
My guess is that it is reading the interface from the GPI, emitting the "virtual method, but no constructor" warning, and then forgetting that the object is a pointer. Peter.