[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Call GSL from C++
From: |
Brad Bell |
Subject: |
[Help-gsl] Call GSL from C++ |
Date: |
Wed, 5 May 2004 11:52:46 -0700 (PDT) |
Is there a standard way to use GSL with C++. The usual thing when linking
C++ to C is to use an definition like the following in your include files
# ifdef __cplusplus
# define GSL_EXTERN_C extern "C"
# else
# define GSL_EXTERN_C extern
# endif
and then replace all occurances in the include files of extern with
GSL_EXTERN_C. At the end of the include file, one could execute the
command. This way the include file would work in included by a C or a C++
compiler.
# undef GSL_EXTERN_C
===================================================================== The
The following is an excerpt from page 309 of INTERNATIONAL STANDARD
ISO/IEC 14882 First edition 1998-09-01 Programming languages C++ Langages
de programmation C++:
__cplusplus
The name __cplusplus is defined to the value 199711L when compiling a C++
translation unit.143)
__________________
143) It is intended that future versions of this standard will replace the
value of this macro with a greater value. Nonconforming compilers should
use a value with at most five decimal digits.
- [Help-gsl] Call GSL from C++,
Brad Bell <=