Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using CPLEx with OSI #152

Closed
sKamer73 opened this issue Mar 3, 2021 · 0 comments
Closed

Using CPLEx with OSI #152

sKamer73 opened this issue Mar 3, 2021 · 0 comments

Comments

@sKamer73
Copy link

sKamer73 commented Mar 3, 2021

Hi all,

First thank for your great job!
I'm contacting you today as I've been trying for the past few hours to use CPLEX from an OsiSolverInterface.
I've been successfully using CBC with OSI for the past months, but I need to use CPLEX for comparative purposes. I could download and install CPLEx v.20.10 with Academics institutionnal. I am using VS2019 and my OSI version is the one integrated in Cbc-2.10.5.

The issue I'm facing so far is the call of cplex library; I created a new project as libOsiCpx, which compiles correctly. Then in my main project, I added the reference of libOsiCpx, and the cplex library (cplex2010.lib) as Additional Dependencies. If I understood correctly, the displayed error message means that the cplew library is not loaded correctly?

1>libOsiCpx.lib(OsiCpxSolverInterface.obj) : error LNK2019: symbole externe non résolu __imp__CPXaddcols@44 référencé dans la fonction "public: virtual void __thiscall OsiCpxSolverInterface::addCol(class CoinPackedVectorBase const &,double,double,double)" (?addCol@OsiCpxSolverInterface@@UAEXABVCoinPackedVectorBase@@NNN@Z) 1>libOsiCpx.lib(OsiCpxSolverInterface.obj) : error LNK2019: symbole externe non résolu __imp__CPXaddfuncdest@16 référencé dans la fonction "private: void __thiscall OsiCpxSolverInterface::gutsOfConstructor(void)" (?gutsOfConstructor@OsiCpxSolverInterface@@AAEXXZ) 1>libOsiCpx.lib(OsiCpxSolverInterface.obj) : error LNK2019: symbole externe non résolu __imp__CPXaddrows@48 référencé dans la fonction "public: virtual void __thiscall OsiCpxSolverInterface::addRow(class CoinPackedVectorBase const &,char,double,double)" (?addRow@OsiCpxSolverInterface@@UAEXABVCoinPackedVectorBase@@DNN@Z) 1>libOsiCpx.lib(OsiCpxSolverInterface.obj) : error LNK2019: symbole externe non résolu __imp__CPXbinvacol@16 référencé dans la fonction "public: virtual void __thiscall OsiCpxSolverInterface::getBInvACol(int,double *)const " (?getBInvACol@OsiCpxSolverInterface@@UBEXHPAN@Z)
And it goes on for 65 functions.

As I'm kind of new to C++ and those library considerations, it might be something "classic Cpp" that I just don't do well. I'm as well new to GitHub and all this, so please correct me if I'm not asking at the good place, etc.

If anyone could help me, it would be greatly appreciated.

Cheers!
Simon

@tkralphs tkralphs closed this as completed Mar 3, 2021
@coin-or coin-or locked and limited conversation to collaborators Mar 3, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants