[Scip] [scip] command line

Stefan Vigerske stefan at math.hu-berlin.de
Thu Jul 15 20:08:54 MEST 2010


Hi,

Morgan Gram wrote:
> Hello All,
> I am doing a program that will using the scip API functions and some glpk
> functions also,
> So with both , how should I write the command line on my makefile?
> only with glpk was like this,
> 
> gcc program.c -o prog -Wall -lm -lglpk -g
> and now that Ive put some scip functions ??

Easiest may be to adjust a Makefile from one of the SCIP examples, e.g.,
MIPSolver. Then you would only need to specify the path of your SCIP
build in the setting of the SCIPDIR variable, and adjust MAINNAME and
MAINOBJ for your application.

Alternatively, you have to specify the SCIP library, the LP interface
(LPI) library, and all dependencies (LP solver, ZIMPL, GMP, Readline,
...). So if you have SCIP compiled in ${SCIPDIR}, you would need
something like
gcc program.c -o prog -Wall -lm -lglpk -g \
  -L${SCIPDIR}/lib -lscip.linux.x86.gnu.opt -llpispx.linux.x86.gnu.opt \
  -lsoplex.linux.x86.gnu.opt
and probably some more -l flags, depending on your system. Just try
linking and from the errors on unresolved symbols it should be easy to
guess which libs are missing. :-)
Or build the scip binary with make scip VERBOSE=1 and see what linker
flags are used to build that one.

Good luck,
Stefan


> 
> 
> 
> Thanks
> Loreena
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip


-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan


More information about the Scip mailing list