C++ support
Thomas Walter
walter@pctc.chemie.uni-erlangen.de
Tue Nov 23 06:43:00 GMT 1999
>>>>> "Jacek" == Jacek Pliszka <pliszka@higgs.ucdavis.edu> writes:
Jacek> Hi!
Jacek> Is there any way the GSL will support C++?
Jacek> It should be fairly simple. Just adding:
Jacek> #ifdef __cplusplus
Jacek> #define __extern_C extern "C"
Jacek> #else
Jacek> #define __extern_C
Jacek> #endif
Jacek> in the gsl_errno.h which is included everywhere
Jacek> and then declaring all functions as
Jacek> __extern_C
Better and common practice is to protect each header which is enough.
Add
#ifdef __cplusplus
extern "C" {
#endif
at header start and
#ifdef __cplusplus
}
#endif
at header end
And you are done.
Bye
Thomas
--
SUSHI? Nein, Danke. Ich esse keine Köder.
----------------------------------------------
Dipl. Phys. Thomas Walter
Inst. f. Physiklische Chemie II
Egerlandstr. 3 Tel.: ++9131-85 27326 / 27330
91058 Erlangen, Germany email: walter@pctc.chemie.uni-erlangen.de
More information about the Gsl-discuss
mailing list