Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

curve

16 views
Skip to first unread message

Adam Majewski

unread,
Jul 24, 2023, 1:47:02 PM7/24/23
to dislin-users
Hi 
I try to compile curve example

gcc curve.c -lm -ldislin
curve.c: In function ‘main’:
curve.c:49:11: warning: passing argument 1 of ‘curve’ from incompatible pointer type [-Wincompatible-pointer-types]
   49 |   curve  (xray, y1ray, n);
      |           ^~~~
      |           |
      |           float *
In file included from curve.c:3:
dislin.h:156:29: note: expected ‘const double *’ but argument is of type ‘float *’
  156 | void  curve  (const double *xray, const double *yray, int n);
      |               ~~~~~~~~~~~~~~^~~~
curve.c:49:17: warning: passing argument 2 of ‘curve’ from incompatible pointer type [-Wincompatible-pointer-types]
   49 |   curve  (xray, y1ray, n);
      |                 ^~~~~
      |                 |
      |                 float *
In file included from curve.c:3:
dislin.h:156:49: note: expected ‘const double *’ but argument is of type ‘float *’
  156 | void  curve  (const double *xray, const double *yray, int n);
      |                                   ~~~~~~~~~~~~~~^~~~
curve.c:51:11: warning: passing argument 1 of ‘curve’ from incompatible pointer type [-Wincompatible-pointer-types]
   51 |   curve  (xray, y2ray, n);
      |           ^~~~
      |           |
      |           float *
In file included from curve.c:3:
dislin.h:156:29: note: expected ‘const double *’ but argument is of type ‘float *’
  156 | void  curve  (const double *xray, const double *yray, int n);
      |               ~~~~~~~~~~~~~~^~~~
curve.c:51:17: warning: passing argument 2 of ‘curve’ from incompatible pointer type [-Wincompatible-pointer-types]
   51 |   curve  (xray, y2ray, n);
      |                 ^~~~~
      |                 |
      |                 float *
In file included from curve.c:3:
dislin.h:156:49: note: expected ‘const double *’ but argument is of type ‘float *’
  156 | void  curve  (const double *xray, const double *yray, int n);
      |                                   ~~~~~~~~~~~~~~^~~~



a@zalman:~/Dokumenty/c/dislin/curve$ ./a.out
 <<<< Warning 10: Begin and end of scaling are equal in graf!
 <<<< Warning 9: Step equal zero in graf!
 <<<< Warning 10: Begin and end of scaling are equal in graf!
 <<<< Warning 9: Step equal zero in graf!
 <<<< Warning 2: Incorrect parameter in setrgb!
 <<<< Warning 3: Incorrect level in grid!   ( 1)
 <<<< Warning 3: Incorrect level in title!   ( 1)
 <<<< Warning 3: Incorrect level in curve!   ( 1)
 <<<< Warning 3: Incorrect level in curve!   ( 1)

 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 <<                END OF DISLIN / VERSION 11.5.1                <<
 <<  Date    : 24.07.2023  Time    : 19:33:25  Pageformat: DA4L  <<
 <<  Vectors : 4           Warnings: 9         Fileformat: CONS  <<
 <<  Metafile:                                                   <<
 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

What can I do ? 

Helmut Michels

unread,
Jul 24, 2023, 3:07:39 PM7/24/23
to dislin-users
Dear Adam,

there are two versions of dislin.h. One is for float variables in the dislin directory, the other
for double variables in the dislin subdirectory real64. I think that you have included the wrong
dislin.h file in your program.

With best regards,

Helmut
Reply all
Reply to author
Forward
0 new messages