[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Compile with C++ Code
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Compile with C++ Code |
Date: |
Mon, 12 Mar 2001 17:20:21 +0300 |
GLPK routines can be easily combined along with C++ programs, because
they are written in the ANSI C dialect. However, GLPK headers can't be
used directly in C++, because they have no 'extern "C" {...}' directive.
Therefore if you wish call some GLPK routines from your C++ program,
you should surround #include directives which include GLPK headers in
the following manner:
extern "C" {
#include "glpk.h"
}
in order to explicitly tell C++ compiler that these headers are written
in C, not in C++.
Sincerely,
Andrew Makhorin