Forum > Other OS

Go32v2 DOS: Compilation of HW Acceleraded GraphiX Lib

(1/2) > >>

tol:
Is anybody able to compile the (hardware accelerated) GraphiX Lib vor Go32v2? ( http://downloads.freepascal.org/fpc/contrib/gxfp405.zip ).

It seems to be made for an older FPC version but not available any more.
I finally got parts of it to compile (graphix.pp), by simply commenting out (hopefully not needed parts) parts that won't compile anymore.
But I get stuck now when trying to compile gxdemo.pas

Current Errors:

gximg.pp(1368,31) Error: You cannot reach COSTAB from that code
gximg.pp(1424,31) Error: You cannot reach COSTAB from that code
gximg.pp(5660,18) Error: function header doesn't match the previous declaration "Read(var <Formal type>;LongInt);"
gximg.pp(5771,18) Error: function header doesn't match the previous declaration "Read(var <Formal type>;LongInt);"

If someone somehow manages to create/obtain the compiled units, or tell me how to fix this error, that would be a great help to me.

cdbc:
Hi
At least I can tell you that these
--- Quote ---gximg.pp(5660,18) Error: function header doesn't match the previous declaration "Read(var <Formal type>;LongInt);"
gximg.pp(5771,18) Error: function header doesn't match the previous declaration "Read(var <Formal type>;LongInt);"
--- End quote ---
errors are to do with the function declaration in interface section doesn't match the function implementation in the implementation section of the unit. Have you changed one or the other?!? Should be easy to fix  8)
The rest... I dunno.
Regards Benny

tol:
I've not changed anything.

This is the implementation within gximg.pp:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---TYPE PMyStream=^TMyStream;     TMyStream=OBJECT(TStream)       f:file;       buffer,curbufferpos:pointer;       buffersize:longint;       bufferstartpos,bufferendpos,bytesinbuffer:longint;       io:longint;       fmode:word;       CONSTRUCTOR Init(name:string;mode,size:word);       DESTRUCTOR Done;virtual;       PROCEDURE read(var buf;count:sw_word);virtual;       PROCEDURE seek(pos:longint);virtual;       FUNCTION getpos:longint;virtual;       FUNCTION getsize:longint;virtual;     END;
According to this the proc read(..) is a new overloaded proc ( besides

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function Read(var Buffer; Count: LongInt) : LongInt; Virtual; Overloadof the TStream base class. Or do I misunderstand this? Maybe I should just change the parameter LongInt to override the base implementation?

cdbc:
Hi
1)

--- Quote ---Maybe I should just change the parameter LongInt to override the base implementation?
--- End quote ---
Yes you should, the overriding method MUST match exactly the virtual overridden method!!!
2)
This function:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function Read(var Buffer; Count: LongInt) : LongInt; Virtual; Overload has got nothing to do with the same-named method of "TMyStream" if anything it would look like this:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---PROCEDURE TMyStream.read(var buf;count:sw_word);begin  ...end; in the implementation section that is...
It seems to me, that you need to read up on your /old-school/ Object-framework(s) to fet more acquanted with the workings of it/them...
I can recommend the programming guides and manuals from Borland on TP 5.5, they're available allover the place to download for free. I even think 'Embarcadero' has one for download at their site  :D
If you feel adventurous, you can have a 'looksee' at our own 'Free Vision' framework, you'll find it in the fpc source-tree, under 'fv' ...and there's even a version for unicode.
Regards Benny

tol:
If I understand correctly, declaring a method with different parameter(s) does not create a new (overloaded) method in FP?
(Because then the error message would be wrong).

( Keine Ahnung ob im Code der Lib die Methode read ├╝berschrieben werden soll oder eine neue Methode read eingef├╝hrt werden sollte, von daher die Verwirrung )

Navigation

[0] Message Index

[#] Next page

Go to full version