GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #11718

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Maurice Lombardi
Subject: polytest.pas:63: error: type mismatch in argument 1 of `GetCPUTime'
Date: 8 Mar 2005, 11:54:19



Shutian Ma a écrit:
> Dear Maurice,
> 
> I re-installed gpc with gcc, and I can compile some
> demos, not all. You may know the following problem.
> 
> Thank you for your help.
> 
> Shutian
> 
> [shma@localhost pascal]$ make -f makefile.lnx
> gpc --automake -O1 -Wall -o polytest polytest.pas
> -L../lib/unix ../lib/unix/libg
> rx20.a -lvga -lm
> polytest.pas: In procedure `SpeedTest':
> polytest.pas:63: error: type mismatch in argument 1 of
> `GetCPUTime'
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/units/gpc.pas:198:
> error:  routin
> e declaration
> polytest.pas:87: error: type mismatch in argument 1 of
> `GetCPUTime'
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/units/gpc.pas:198:
> error:  routin
> e declaration
> polytest.pas:111: error: type mismatch in argument 1
> of `GetCPUTime'
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/units/gpc.pas:198:
> error:  routin
> e declaration
> make: *** [polytest] Error 1
> [shma@localhost pascal]$
>  --- Maurice Lombardi
> <Maurice.Lombardi@ujf-grenoble.fr> wrote: 

Yes. It was a change in recent versions of gpc (introduction of
CInteger / CCardinal to secure interface with C programs) which has not (yet) 
been mirrored in this test.
Apply the following diff

--- polytest.pas.orig	2003-05-27 21:38:34.000000000 +0000
+++ polytest.pas	2005-03-08 11:57:56.000000000 +0000
@@ -57,7 +57,7 @@
     sy  : Integer = (GrSizeY - 2*hh) div 32;
     ii,jj : Integer;
     color : GrColor;
-   t1,t2,t3,mu1,mu2,mu3: Integer;
+   t1,t2,t3,mu1,mu2,mu3: CInteger;
  begin
     GrClearScreen(black);
     t1 := GetCPUTime(mu1);

While I am here, I think to an other problems.
There have been several diffs with respect to grx-2.4.6 on the gpc or grx lists 
pertaining to pascal, many related to changes in the syntax of the compiler,
for interfaces to assembly / C modules.
I attach those I have applied (in order).
There are also other diffs pertaining mainly to the win32 driver,
which I have not applied, nor kept track of, because I use djgpp.
Some are in the grx247p1.zip prerelease.

Maurice

File attachments

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).