LAPACK Archives

[Lapack] clapack warning: implicit declaration of function ‘f2c_idamax’


The f2c_ prefix can be turned off by modifying the following lines in

# if no wrapping of the blas library is needed, uncomment next line
#CC        = gcc -DNO_BLAS_WRAP

Clearly if you want other routines to call idamax, f2c_idamax won't work 
so you have to turn the prefix wrapping off.

As to the 'implicit declaration' warning, you could try add a 
declaration of the f2c_idamax to the beginning of your code, example can 
be found from INCLUDE/clapack.h:

integer idamax_(integer *n, doublereal *dx, integer *incx);

And if you are using prefix, just change it to

integer f2c_idamax_(integer *n, doublereal *dx, integer *incx);

Let me know if this doesn't work.


Michael Chen wrote:
Dear there,

I followed the installation steps carefully, using the reference BLAS,  
and I can compile a small example. Even though the annoying message  
appears, the generated binary can run and gives correct result. Does  
the warning mean anything?
Also I am wondering why the function is idamax_(), while in many  
documents and webpage, it is called cblas_idamax_()? Would I encounter  
portability difficulty using this name?

Thanks for the package!

Michael Chen

gcc -g -Wall -pedantic -I/Users/michaelchen/Documents/mycode/ 
CLAPACK-3.2.1/INCLUDE -I/Users/michaelchen/Documents/mycode/ 
mischeaders    idamax.c  /Users/michaelchen/Documents/mycode/ 
CLAPACK-3.2.1/blas_OS.a /Users/michaelchen/Documents/mycode/ 
CLAPACK-3.2.1/F2CLIBS/libf2c.a -lm -o idamax
idamax.c: In function ?main?:
idamax.c:12: warning: implicit declaration of function ?f2c_idamax?

#include <stdlib.h>
#include <stdio.h>
#include "f2c.h"
#include "blaswrap.h"

int main(){
  integer N = 5;
  double a[5]={9,2,2,10,3};
  int r=0;
  integer incr=1;
  r = idamax_(&N, a, &incr);
  return 0;
Lapack mailing list

<Prev in Thread] Current Thread [Next in Thread>

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or