Troubleshooting Seldon Package Compiling Error in Visual Studio 2010

  • Thread starter Thread starter AIR&SPACE
  • Start date Start date
  • Tags Tags
    Difficulty
Click For Summary
Compiling a test project in Visual Studio 2010 for the Seldon package is encountering multiple build errors, primarily related to undefined identifiers such as LAPACK_INTEGER, LAPACK_REAL, and LAPACK_COMPLEX. These errors suggest that necessary header files are missing from the project. The user attempted to include LAPACK++ but faced a fatal error due to the absence of the 'generic.h' file, which is referenced in the arch.h file. Despite searching for 'generic.h', the user found multiple versions online but could not confirm their relevance to the required file. The discussion emphasizes the need to include the correct header files as specified in the library documentation to resolve the undefined identifier errors. Suggestions include checking the include paths in project properties to ensure all necessary headers are correctly referenced.
AIR&SPACE
Messages
100
Reaction score
0
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:
// 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_COMPLEX *u, LAPACK_INTEGER *ldu, LAPACK_COMPLEX *c__, LAPACK_INTEGER *ldc, LAPACK_REAL *rwork, 
			     LAPACK_INTEGER *info);

Code:
Error: identifier "LAPACK_INTEGER" is undefined
Error: identifier "LAPACK_REAL" is undefined
Error: identifier "LAPACK_COMPLEX" is undefined
etc.

To counter this I #include 'd LAPACK++ and receive this error:
Code:
arch.h(14): fatal error C1083: Cannot open include file: 'generic.h': No such file or directory

Contents of arch.h are:
Code:
//      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
#else
#include <generic.h> 
#define F77NAME(x) name2(x,_)
#endif

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

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

#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
 
Technology news on Phys.org
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...>).
 
  • Like
Likes 1 person
That's the thing, though... there is no generic.h I've googled it and get two different generic.h 's :
http://www.hexcodes.org/tools/netcat/Netcat/generic.h
https://github.com/vlfeat/vlfeat/blob/master/vl/generic.h

but there's nothing that makes me believe that either is the 'generic.h' that arch.h within LAPACK is 'looking' for...
 
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.

identifier "LAPACK_INTEGER" is undefined
Error: identifier "LAPACK_REAL" is undefined
Error: identifier "LAPACK_COMPLEX" is undefined

You should probably check the library documentation to find out what header file you should include.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 57 ·
2
Replies
57
Views
5K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
10K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 28 ·
Replies
28
Views
9K