question on C preprocessor definitions
Hi I am currently installing a software called super LU and in the README file there is the following instruction for modifying a makefile depending on system set-up.
C preprocessor definition CDEFS. In the header file SRC/Cnames.h, we use macros to determine how C routines should be named so that they are callable by Fortran. (Some vendor-supplied BLAS libraries do not have C interfaces. So the re-naming is needed in order for the SuperLU BLAS calls (in C) to interface with the Fortran-style BLAS.) The possible options for CDEFS are: o -DAdd_: Fortran expects a C routine to have an underscore postfixed to the name; o -DNoCh开发者_高级运维ange: Fortran expects a C routine name to be identical to that compiled by C; o -DUpCase: Fortran expects a C routine name to be all uppercase.
A Makefile is provided in each subdirectory. The installation can be done completely automatically by simply typing "make" at the top level.
I am not really sure what this instruction means. Which of these three options should I choose?
Just try building the software running make at the top level. If there are linking problems because of missing BLAS functions start experimenting with underscore. So start with NoChange, then try Add_.
精彩评论