[gecode-users] Gecode compiling error

Christian Schulte cschulte at kth.se
Fri May 19 16:22:09 CEST 2017


Hi Julie,

 

Yes, that looks like a version problem. Unfortunately, I am not using clang for development. Guido, can you comment here?

 

Cheers

Christian

 

--

Christian Schulte, www.gecode.org/~schulte

Professor of Computer Science, KTH, cschulte at kth.se

Expert Researcher, RISE SICS, christian.schulte at ri.se

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Julie B
Sent: Thursday, May 18, 2017 14:22
To: users at gecode.org
Subject: [gecode-users] Gecode compiling error

 

Hi everyone,

I have just downloaded and installed Gecode. I am now trying to compile gecode in my main file but an undefined template error shows up.

Here is the error:
      g++   -L/usr/lib -lgecodeint -lgecodesearch -lgecodekernel -lgecodesupport -lgecodedriver -lgecodeminimodel  carremagique.cpp   -o carremagique
      In file included from carremagique.cpp:1:
      In file included from /usr/local/include/gecode/driver.hh:41:
      In file included from /usr/local/include/gecode/minimodel.hh:47:
      In file included from /usr/local/include/gecode/kernel.hh:241:
      /usr/local/include/gecode/kernel/branch-val.hpp:57:18: error: implicit instantiation of undefined template 'std::__1::function<void (Gecode::Space &, unsigned int, Gecode::IntVar, int, int)>'
          BranchCommit cf;
                                   ^
      /usr/local/include/gecode/int.hh:4503:31: note: in instantiation of template
           class 'Gecode::ValBranch<Gecode::IntVar>' requested here
        class IntValBranch : public ValBranch<IntVar> {
                                                   ^
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__functional_03:206:49: note: template is declared here
          template<class _Fp> class _LIBCPP_TYPE_VIS_ONLY function; // undefined
                                                                                                    ^

It comes from the include line "#include <gecode/driver.hh>" from my main file (carremagique.cpp)



I'm running under Mac OS X 10.10.5, my version of Gecode is 5.1.0 and the g++ version is:
   Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
   Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
   Target: x86_64-apple-darwin14.5.0
   Thread model: posix

As no one seems to have had this error, I think I must have forgotten something, or that it's a problem of version.

I will be very thankful if you could help me.


Have a good day !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20170519/b8b87e27/attachment.html>


More information about the users mailing list