Hi Vijay, Not being an Apple user, let me still try a guess: you need to add additional libraries: -lgecodeminimodel -lgecodedriver -lgecodegist
Please use the order as described in MPG. Good luck Christian -- Christian Schulte, Professor of Computer Science, KTH, www.gecode.org/~schulte/ -----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Vijay Saraswat Sent: Monday, October 13, 2014 4:51 PM To: users@gecode.org Subject: [gecode-users] Compilation problem on MacOs with Gecode 4.3 Continuing with http://www.gecode.org/pipermail/users/2014-April/004368.html I am unable to get the basic example running from the tutorial. On a MacBook, OS X 10.9.2, XCode 5.1.1, trying to install GECode 4.3 from the webpage http://www.gecode.org/download.html Downloaded source package, did a ./configure, make, make-install -- all seemed to succeed. The following command succeeds: $g++ -O3 -I/usr/local/include -stdlib=libstdc++ -c money.cpp However, the next command fails -- what am I doing wrong? $g++ -v -o money money.o -L/usr/local/lib -stdlib=libstdc++ -lgecodesearch -lgecodeint -lgecodekernel -lgecodesupport Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.1.0 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch ain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Develop er/SDKs/MacOSX10.9.sdk -o money -L/usr/local/lib money.o -lgecodesearch -lgecodeint -lgecodekernel -lgecodesupport -lstdc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolcha in/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a Undefined symbols for architecture x86_64: "Gecode::LinIntExpr::~LinIntExpr()", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::BaseOptions::help()", referenced from: vtable for Gecode::Options in money.o "Gecode::BaseOptions::parse(int&, char**)", referenced from: _main in money.o "Gecode::BaseOptions::~BaseOptions()", referenced from: Gecode::Options::~Options() in money.o "Gecode::rel(Gecode::Home, Gecode::BoolExpr const&, Gecode::IntConLevel)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::Driver::BaseOption::~BaseOption()", referenced from: Gecode::Options::~Options() in money.o "Gecode::Driver::CombinedStop::sigint", referenced from: void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::Driver::EngineToMeta>(Gecode::Options const&, Money*) in money.o void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::RBS>(Gecode::Options const&, Money*) in money.o Gecode::Driver::CombinedStop::interrupt(int) in money.o Gecode::Driver::CombinedStop::CombinedStop(unsigned int, unsigned int, unsigned int) in money.o Gecode::Driver::CombinedStop::stop(Gecode::Search::Statistics const&, Gecode::Search::Options const&) in money.o "Gecode::Driver::StringOption::add(int, char const*, char const*)", referenced from: _main in money.o "Gecode::Driver::StringOption::~StringOption()", referenced from: Gecode::Options::~Options() in money.o "Gecode::Driver::StringValueOption::~StringValueOption()", referenced from: Gecode::Options::~Options() in money.o "Gecode::Driver::am(double*, int)", referenced from: void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::Driver::EngineToMeta>(Gecode::Options const&, Money*) in money.o void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::RBS>(Gecode::Options const&, Money*) in money.o "Gecode::Driver::dev(double*, int)", referenced from: void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::Driver::EngineToMeta>(Gecode::Options const&, Money*) in money.o void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::RBS>(Gecode::Options const&, Money*) in money.o "Gecode::Driver::stop(Gecode::Support::Timer&, std::ostream&)", referenced from: void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::Driver::EngineToMeta>(Gecode::Options const&, Money*) in money.o void Gecode::Driver::ScriptBase<Gecode::Space>::runMeta<Money, Gecode::DFS, Gecode::Options, Gecode::RBS>(Gecode::Options const&, Money*) in money.o "Gecode::branch(Gecode::Home, Gecode::IntVarArgs const&, Gecode::IntVarBranch, Gecode::IntValBranch, bool (*)(Gecode::Space const&, Gecode::IntVar, int), void (*)(Gecode::Space const&, Gecode::BrancherHandle const&, unsigned int, Gecode::IntVar, int, int const&, std::ostream&))", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::Options::Options(char const*)", referenced from: _main in money.o "Gecode::BoolExpr::BoolExpr(Gecode::LinIntRel const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::BoolExpr::~BoolExpr()", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::operator==(Gecode::LinIntExpr const&, Gecode::LinIntExpr const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::operator==(Gecode::IntVar const&, Gecode::IntVar const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::operator*(int, Gecode::IntVar const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::operator+(Gecode::LinIntExpr const&, Gecode::IntVar const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::operator+(Gecode::LinIntExpr const&, Gecode::LinIntExpr const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::operator+(Gecode::IntVar const&, Gecode::LinIntExpr const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "Gecode::operator+(Gecode::IntVar const&, Gecode::IntVar const&)", referenced from: Money::Money(Gecode::Options const&) in money.o "typeinfo for Gecode::BaseOptions", referenced from: typeinfo for Gecode::Options in money.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) bash-3.2$ _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users