当前位置: 动力学知识库 > 问答 > 编程问答 >

makefile - 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 -DNoChange: 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_.

分享给朋友:
您可能感兴趣的文章:
随机阅读: