Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Difficulty Compiling

  1. Jul 22, 2013 #1
    I'm having some difficulty compiling a test project within Visual Studio 2010. I'm trying to test the Seldon package, but keep getting errors during build.

    Specific errors I'm getting include (and vary between):
    Code (Text):
    // Headers from CLAPACK, downloaded at http://www.netlib.org/clapack/.

    // Modifications (by Vivien Mallet):
    // Replacements:
    //    integer       --> LAPACK_INTEGER
    //    real          --> LAPACK_REAL
    //    doublereal    --> LAPACK_DOUBLEREAL
    //    complex       --> LAPACK_COMPLEX
    //    doublecomplex --> LAPACK_DOUBLECOMPLEX
    //    logical       --> LAPACK_LOGICAL
    //    L_fp          --> LAPACK_L_FP
    //    ftnlen        --> LAPACK_FTNLEN

    #ifndef __CLAPACK_H
    #define __CLAPACK_H
    /* Subroutine */ int cbdsqr_(char *uplo, LAPACK_INTEGER *n, LAPACK_INTEGER *ncvt, LAPACK_INTEGER *
                     nru, LAPACK_INTEGER *ncc, LAPACK_REAL *d__, LAPACK_REAL *e, LAPACK_COMPLEX *vt, LAPACK_INTEGER *ldvt,
                     LAPACK_INTEGER *info);
    Code (Text):
    Error: identifier "LAPACK_INTEGER" is undefined
    Error: identifier "LAPACK_REAL" is undefined
    Error: identifier "LAPACK_COMPLEX" is undefined
    To counter this I #include 'd LAPACK++ and receive this error:
    Code (Text):
    arch.h(14): fatal error C1083: Cannot open include file: 'generic.h': No such file or directory
    Contents of arch.h are:
    Code (Text):
    //      LAPACK++ (V. 1.1)
    //      (C) 1992-1996 All Rights Reserved.

    // Linkage names between C, C++, and Fortran (platform dependent)

    #ifndef _ARCH_H_
    #define _ARCH_H_

    #if  defined(RIOS) && !defined(CLAPACK)
    #define F77NAME(x) x
    #include <generic.h>
    #define F77NAME(x) name2(x,_)

    #if defined(SGI) && !defined(SGI_DEC)
    #define SGI_DEC

    extern "C" {
        void mkidxname() {}
        void mkdatname() {}

    #endif // _ARCH_H_
    I've nearly given up trying to get this to build, just thought I'd see if maybe there was a quick, KISS, you're an idiot... fix to whatever my problem is. Win7 -- Windows Visual Studio 2010
  2. jcsd
  3. Jul 23, 2013 #2


    User Avatar
    Science Advisor
    Homework Helper

    The "identifier not found" errors indicate that you should include the header. Probably that header, in turn, uses generic.h, which the compiler cannot find.
    Try putting the path at which you downloaded the header files in the Include path (Project -> <Project> properties -> Configuration Properties -> VC++ Directories -> Include Directories -> click the dropdown and <Edit...>).
  4. Jul 23, 2013 #3
  5. Jul 23, 2013 #4


    User Avatar
    Gold Member

    The following error is generated because these "user defined types" are not defined in the file. So you need to include whatever header file defines these types.

    You should probably check the library documentation to find out what header file you should include.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook