[gecode-users] Compatibility with Visual C++

Lingrui Liao lingrui at gmail.com
Tue Mar 31 03:14:07 CEST 2009


I've downloaded and installed Gecode-3.0.2-x86.msi (32-bit) on Windows XP.
Instructions in the document "Modeling with Gecode" was followed to
configure a Windows console application within Visual Studio 2005.
When I was trying to compile an example program with Gecode, Visual
C++ 2005 reports the following error(among some similar ones):

...
Error	12	error C2248: 'Gecode::Branching::cast' : cannot access
private member declared in class 'Gecode::Branching'	c:\program
files\gecode\include\gecode\kernel\core.hpp	3362
...

the indicated site of error is like:
...
forceinline const Branching&
  Space::Branchings::branching(void) const {
    return *Branching::cast(c);
  }
...


It seems to be a compatibility issue on private member accessibility.
Does anyone know a way to work around it? Thanks.

Lingrui Liao




More information about the gecode-users mailing list