[Scip] compile linear solver to a shared library
Gregor Hendel
hendel at zib.de
Wed Feb 6 12:57:54 MET 2013
Hi Maxim,
I'm not sure if I got your question right. Do you want to
1) make shared libraries for the SCIP default distribution,
or do you have
2) a customized example which you want to librarize?
Since 2) depends on 1), I will try to answer both questions. The SCIP
Makefile already provides the functionality to create shared libraries.
Here's what I would do, assuming you are using gcc and linux:
1) Go to the SCIP-directory, build the shared libraries by typing
make SHARED=true
which should output something like
-> generating library lib/libscip-3.0.1.1.linux.x86_64.gnu.opt.so
-> generating library lib/libobjscip-3.0.1.1.linux.x86_64.gnu.opt.so
-> generating library lib/liblpispx-3.0.1.1.linux.x86_64.gnu.opt.so
-> generating library lib/libnlpi.cppad-3.0.1.1.linux.x86_64.gnu.opt.so
at the end, depending on your SCIP-version, of course.
2) In case you want to also include your customized example code into a
shared library "libtest.so", go to the main directory of your example,
type
make clean
followed by
make SHARED=true VERBOSE=true
which creates object files suitable for a shared library in the
obj/O.linux.x86_64.gnu.*/ directory of your example. Finally,
type
gcc -shared -o libexample.so obj/O.linux.x86_64.gnu.opt/*.o
to put everything into the desired library. Hope this helps.
Best regards,
Gregor
Am 06.02.2013 01:54, schrieb Maxim Pauk:
> Hi,
>
> Could someone give me a hint,
> how makefile of linear ordering solver example could be modified,
> such that compilation would output a shared library instead of
> executable binary?
>
>
> ( I'm creating a R package of Gobnilp, which uses Scip libraries.
> So far I couldn't manage to compile it with R CMD SHLIB,
> so now I want to add an additional interface layer,
> that would load the program separately, as a shared library,
> precompiled separately; therefore my question )
>
> Kind wishes,
> Maxim
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20130206/27925c7c/attachment.html
More information about the Scip
mailing list