[gecode-users] Newbie problem

Guido Tack tack at gecode.org
Sun Nov 3 00:20:21 CET 2013


Hi Torsten,

you seem to have an older version of Gecode installed in /usr/local (that's what the clang error messages point to).

The 35 is the "library version", which is simply incremented with each release and doesn't follow the major.minor.patch scheme.

Cheers,
Guido

On 3 Nov 2013, at 4:11 am, Torsten Anders <Torsten.Anders at beds.ac.uk> wrote:

> On 2 Nov 2013, at 09:13, Torsten Anders <torsten.anders at beds.ac.uk> wrote:
>> Dear Gecoders,
>> 
>> I am trying to run some ready-made Gecode examples on a Mac without success. For example, with the first example from the tutorial (http://www.gecode.org/doc/4.2.0/MPG/send-more-money.cpp) in run into several errors, for example, 
>> 
>> 'INT_VAL_SPLIT_MIN' cannot be used as a function	
>> 'INT_VAR_SIZE_MIN' cannot be used as a function	
>> 
>> As these errors appear for several examples, it appears to me there is something fundamentally wrong. This might well be some installation error on my part. Nevertheless, help is appreciated -- I simply do not know where to start addressing such a problem.  
>> 
>> BTW: I just installed Gecode version 4.2 (binaries Gecode-4.2.0.dmg) on my Mac, after uninstalling some older version. I was surprised to find that /Library/Frameworks/gecode.framework/Versions/ contains a folder named "35" -- I would have expected it to be named "42", for version 4.2, but that could of course be simply a wrong guess on my part.   
>> 
>> Best wishes,
>> Torsten
> 
> 
> I tried to better isolate the problem. Both g++ (gcc) 4.2.1 and clang 5.0 report problems with the example send-more-money.cpp (http://www.gecode.org/doc/4.2.0/MPG/send-more-money.cpp), but the errors differ. The details are below. 
> 
> What am I missing?  
> 
> Best wishes,
> Torsten
> 
> $ g++ -O3 -c send-more-money.cpp
> send-more-money.cpp: In constructor ‘SendMoreMoney::SendMoreMoney()’:
> send-more-money.cpp:55: error: ‘INT_VAR_SIZE_MIN’ cannot be used as a function
> send-more-money.cpp:55: error: ‘INT_VAL_MIN’ cannot be used as a function
> 
> $ g++ --version
> i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
> Copyright (C) 2007 Free Software Foundation, Inc.
> 
> 
> $ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -O3 -c send-more-money.cpp
> In file included from send-more-money.cpp:28:
> In file included from /usr/local/include/gecode/int.hh:50:
> In file included from /usr/local/include/gecode/iter.hh:97:
> /usr/local/include/gecode/iter/ranges-scale.hpp:197:27: error: reference to
>      non-static member function must be called; did you mean to call it with no
>      arguments?
>      static_cast<UnsVal>(max - min + 1);
>                          ^~~
> /usr/local/include/gecode/iter/ranges-scale.hpp:197:33: error: reference to
>      non-static member function must be called; did you mean to call it with no
>      arguments?
>      static_cast<UnsVal>(max - min + 1);
>                                ^~~
> send-more-money.cpp:55:42: error: called object type 'int' is not a function or
>      function pointer
>        branch(*this, l, INT_VAR_SIZE_MIN(), INT_VAL_MIN());
>                         ~~~~~~~~~~~~~~~~^
> 3 errors generated.
> 
> $ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version
> Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
> 
> 
>> --
>> Dr Torsten Anders
>> Course Leader, Music Technology
>> University of Bedfordshire
>> Park Square, Room A315
>> http://www.torsten-anders.de
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list