help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Problem using GLPK 3.1


From: Andrew Makhorin
Subject: Re: [Help-glpk] Problem using GLPK 3.1
Date: Wed, 29 May 2002 09:01:40 +0400

>I've just upgraded my GLPK 3.0.5 to 3.1. When I tried to compile the
>new GLPK's API with my programs I ran into the following error.
>
>/usr/local/include/glplpx.h: 297 : parse error before ';'
>/usr/local/include/glplpx.h: 598 : parse error before ';'
>
>Looking at "glplpx.h", I found a variable declaration "int class".

Yes, the identifier 'class' is reserved word in C++, but not in C.
It is unclear to me why the C++ compiler recognizes it as a reserved
word, so I should consult the C++ standard. In any case I will change
the name 'class' to something else in the next version of the package.

You can get rid of this error in the following way:

extern "C" {
...
#define class class1
#include "glpk.h"
#undef class
...
}

Thank you for your bug report!






reply via email to

[Prev in Thread] Current Thread [Next in Thread]