Jump to content

GLPK/C++

From Wikibooks, open books for an open world

The programming languages C and C++ do not need dedicated GLPK language bindings. GLPK is programmed natively in C. And C++ can normally link without problem to C code. Moreover, there is no need to use the following C linkage construct extern "C" when calling GLPK from C++:

extern "C" {            // NOT REQUIRED
#include <glpk.h>       // C header
}

Instead simply use:

#include <glpk.h>       // C header