[gecode-users] Gecode compiling error
Julie B
wakfusienne at gmail.com
Thu May 18 14:22:14 CEST 2017
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/20170518/3a4d74c0/attachment.html>
More information about the users
mailing list