[SCIP] Not compile with C++

Jakob Witzig witzig at zib.de
Thu Nov 26 15:20:38 CET 2015


Hi Shirai,

I think you have not linked SCIP correctly. Did you use the Makefiles 
provided by SCIP? You can have a look into the vrp example of SCIP: 
scip-path/examples/VRP or http://scip.zib.de/doc/examples/VRP/. This is 
an example in C++.

Please note, you have to compile SCIP in scip-path, e.g. with 'make 
OPT=opt LPS=spx', and your code, e.g., scip-path/examples/your_example, 
with the same compile command, i.e., again 'make OPT=opt LPS=spx'.

If your own code is located at a different path as 
scip-path/examples/your_example you have to change the SCIPDIR in the 
Makefile of your own code, per default this is '../..'.

Best
Jakob

On 11/26/15 14:31, Satoshi Shirai wrote:
> Dear,
>
> I want to solve SOCP with C++.
> I get syntax error : undefined reference to `SCIPcreate' and more.
>
> ...
> #include "scip/scip.h"
> #include "objscip/objscip.h"
> #include "objscip/objscipdefplugins.h"
> #include "scip/def.h"
> #include "scip/cons_soc.h"
> #include "objscip/objcloneable.h"
> #include "scip/scipdefplugins.h"
> ...
> int main(int argc, char* argv[])
> SCIP* scip;
> SCIP_CALL(SCIPcreate(&scip));
> ...
>
>
> Sincerely,
> Shirai
>

-- 
Jakob Witzig

Konrad-Zuse-Zentrum für
Informationstechnik Berlin (ZIB)

Division Mathematical Optimization and Scientific Information
Research Group Mathematical Optimization Methods

Takustrasse 7
14195 Berlin

Tel. : +49 (0)30 84185-416
Fax  : +49 (0)30 84185-269
email: witzig at zib.de


More information about the Scip mailing list