[Clp] Error when building project with CLP using C++ and XCode.

Miles Lubin miles.lubin at gmail.com
Sat May 7 16:11:53 EDT 2016


Hi Victor,

We have benchmarks comparing model construction in JuMP versus the Gurobi
C++ API, described at http://arxiv.org/abs/1508.01982 with code at
https://github.com/mlubin/JuMPSupplement. We haven't put together
benchmarks on column generation since these would have a quite smaller
target audience, but I'll be interested to see if Jesse is able to report
any comparisons.

Best,
Miles

On Sat, May 7, 2016 at 4:03 PM, Victor Zverovich <victor.zverovich at gmail.com
> wrote:

> Hi Miles,
>
> Do you have a benchmark comparing problem construction time using Clp C++
> API vs JuMP or similar?
>
> - Victor
>
> On Sat, May 7, 2016 at 12:10 PM Miles Lubin <miles.lubin at gmail.com> wrote:
>
>> Hi Jesse,
>>
>> Why do you feel that model building in C++ would be faster than JuMP?
>> JuMP supports column generation and passes data directly to the in-memory
>> Clp representation of the problem.
>>
>> Miles
>>
>> On Sat, May 7, 2016 at 9:20 AM, Jesse Jaanila <jessejaanila at gmail.com>
>> wrote:
>>
>>> Hi!
>>>
>>> I've had success using CLP via Julia JuMP API, but now i'm trying to use
>>> C++ for faster model building (column generation scheme).
>>>
>>> I'm on Mac OS X El Capitan with newest XCode and command line tools. I
>>> built CLP 1.16 as described on
>>> https://projects.coin-or.org/Clp with make, make test and make install.
>>> Everything went fine and installation was successful.
>>>
>>> I am trying to build one of the examples; specifically
>>> https://projects.coin-or.org/Clp/browser/trunk/Clp/examples/addColumns.cpp
>>> to fiddle around with the C++ API.
>>>
>>> I set up search paths for header files and libraries (see picture link)
>>> for my project.
>>>
>>> https://i.imgur.com/FdSdNNR.png
>>>
>>> This got away error "ClpSimplex.hpp file not found". So I was really
>>> hopeful that that is all the configurating I need to do.
>>>
>>> But still my build fails. My error log is (main.cpp is my project file
>>> name):
>>>
>>> *Undefined symbols for architecture x86_64:*
>>>
>>>   "ClpSimplex::loadProblem(CoinModel&, bool)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::setRowLower(int, double)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::setRowUpper(int, double)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::initialSolve()", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::allSlackBasis(bool)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::dual(int, int)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::resize(int, int)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::readMps(char const*, bool, bool)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::ClpSimplex(ClpSimplex const&, int)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::ClpSimplex(bool)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::~ClpSimplex()", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpSimplex::operator=(ClpSimplex const&)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpModel::addColumns(CoinModel&, bool, bool)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpModel::addColumns(CoinBuild const&, bool, bool)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpModel::deleteColumns(int, int const*)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpModel::addRows(int, double const*, double const*,
>>> CoinPackedVectorBase const* const*)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "ClpModel::addColumn(int, int const*, double const*, double, double,
>>> double)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "CoinBuild::addColumn(int, int const*, double const*, double, double,
>>> double)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "CoinBuild::CoinBuild()", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "CoinBuild::~CoinBuild()", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "CoinModel::setRowBounds(int, double, double)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "CoinModel::addColumn(int, int const*, double const*, double, double,
>>> double, char const*, bool)", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "CoinModel::CoinModel()", referenced from:
>>>
>>>       _main in main.o
>>>
>>>   "CoinModel::~CoinModel()", referenced from:
>>>
>>>       _main in main.o
>>>
>>> ld: symbol(s) not found for architecture x86_64
>>>
>>> *clang: error: linker command failed with exit code 1 (use -v to see
>>> invocation)*
>>>
>>> Sadly i'm still quite new to C++ so I haven't been able to pinpoint what
>>> the problem is. Could it be something trivial? Do I need something else
>>> when building C++ project with CLP other than search setup for
>>> Header/Library paths? Maybe someone else has had similar problem with mac
>>> os x & XCode.
>>>
>>> Any ideas are helpful! Cheers,
>>>
>>> Jesse
>>>
>>> _______________________________________________
>>> Clp mailing list
>>> Clp at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/clp
>>>
>>>
>> _______________________________________________
>> Clp mailing list
>> Clp at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/clp
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20160507/67015614/attachment.html>


More information about the Clp mailing list