[SCIP] Compile and link problem

Matthias Miltenberger miltenberger at zib.de
Thu Apr 7 12:52:49 CEST 2016


Dear HaoZhou,

you're missing the link to ZLIB:
http://bfy.tw/58yG

all the best
Matthias

On 07.04.2016 12:39, 碎了的流年 wrote:
> SCIP team,
> Hi,
> I am a student from Nanjing University. I want to use scip to solve 
> some problem. But I have a question in linking my program with the 
> scip static link library.
>
> I get these static library by compiling the SCIP optimization suite 
> source code.
>
> zhouxiaohao at zhouxiaohao-virtual-machine:~/scipoptsuite-3.2.1/local$ ls lib
> liblpispx-3.2.1.linux.x86_64.gnu.opt.a
> liblpispx.a
> liblpispx.linux.x86_64.gnu.opt.a
> libnlpi.cppad-3.2.1.linux.x86_64.gnu.opt.a
> libnlpi.cppad.a
> libnlpi.cppad.linux.x86_64.gnu.opt.a
> libobjscip-3.2.1.linux.x86_64.gnu.opt.a
> libobjscip.a
> libobjscip.linux.x86_64.gnu.opt.a
> libscip-3.2.1.linux.x86_64.gnu.opt.a
> libscip.a
> libscip.linux.x86_64.gnu.opt.a
> libscipopt-3.2.1.linux.x86_64.gnu.opt.a
> libscipopt.a
> libsoplex-2.2.1.linux.x86_64.gnu.opt.a
> libsoplex.a
> libsoplex.linux.x86_64.gnu.opt.a
>
> But when I input the command to link them with my program, I get some 
> error.
> zhouxiaohao at zhouxiaohao-virtual-machine:~/scipoptsuite-3.2.1/local$ 
> g++ future_net.c -o future_net -I include -L lib  -llpispx 
> -lnlpi.cppad -lscip -lobjscip -lscipopt
> lib/libscipopt.a(gzstream.o): In function 
> `gzstream::gzstreambuf::underflow()':
> gzstream.cpp:(.text+0x60): undefined reference to `gzread'
> lib/libscipopt.a(gzstream.o): In function 
> `gzstream::gzstreambuf::open(char const*, int)':
> gzstream.cpp:(.text+0xf2): undefined reference to `gzopen'
> lib/libscipopt.a(gzstream.o): In function 
> `gzstream::gzstreambuf::close()':
> gzstream.cpp:(.text+0x16f): undefined reference to `gzclose'
> lib/libscipopt.a(gzstream.o): In function 
> `gzstream::gzstreambuf::flush_buffer()':
> gzstream.cpp:(.text+0x27b): undefined reference to `gzwrite'
> lib/libscip.a(fileio.o): In function `SCIPfread':
> fileio.c:(.text+0x2e): undefined reference to `gzread'
> lib/libscip.a(fileio.o): In function `SCIPfwrite':
> fileio.c:(.text+0x4e): undefined reference to `gzwrite'
> lib/libscip.a(fileio.o): In function `SCIPfprintf':
> fileio.c:(.text+0x145): undefined reference to `gzputs'
> lib/libscip.a(fileio.o): In function `SCIPfseek':
> fileio.c:(.text+0x1f5): undefined reference to `gzseek'
> lib/libscip.a(fileio.o): In function `SCIPfopen':
> fileio.c:(.text+0x1): undefined reference to `gzopen'
> lib/libscip.a(fileio.o): In function `SCIPfdopen':
> fileio.c:(.text+0x11): undefined reference to `gzdopen'
> lib/libscip.a(fileio.o): In function `SCIPfputc':
> fileio.c:(.text+0x178): undefined reference to `gzputc'
> lib/libscip.a(fileio.o): In function `SCIPfputs':
> fileio.c:(.text+0x18a): undefined reference to `gzputs'
> lib/libscip.a(fileio.o): In function `SCIPfgetc':
> fileio.c:(.text+0x1b1): undefined reference to `gzgetc'
> lib/libscip.a(fileio.o): In function `SCIPfgets':
> fileio.c:(.text+0x1d3): undefined reference to `gzgets'
> lib/libscip.a(fileio.o): In function `SCIPfflush':
> fileio.c:(.text+0x1e6): undefined reference to `gzflush'
> lib/libscip.a(fileio.o): In function `SCIPrewind':
> fileio.c:(.text+0x201): undefined reference to `gzrewind'
> lib/libscip.a(fileio.o): In function `SCIPftell':
> fileio.c:(.text+0x211): undefined reference to `gztell'
> lib/libscip.a(fileio.o): In function `SCIPfeof':
> fileio.c:(.text+0x221): undefined reference to `gzeof'
> lib/libscip.a(fileio.o): In function `SCIPfclose':
> fileio.c:(.text+0x231): undefined reference to `gzclose'
> collect2: error: ld returned 1 exit status
>
> Can you tell me how to compile my program correctly ?
> Thanks
>
> HaoZhou
> Nanjing University
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip

-- 
\__________________

Matthias Miltenberger
Zuse Institute Berlin
Takustr. 7, 14195 Berlin
www.zib.de/miltenberger
miltenberger at zib.de
+49 (30) 841 85-245

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160407/69ae3700/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160407/69ae3700/attachment.p7s>


More information about the Scip mailing list