在Linux CentOS 6.4(Final)上编译Scipsuite时,出现以下错误:
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objmessagehdlr.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objnodesel.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objpresol.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objpricer.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objprobdata.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objprop.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objreader.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objrelax.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objsepa.o
-> compiling obj/O.linux.x86_64.gnu.opt/lib/objscip/objvardata.o
-> generating library lib/libobjscip-3.2.0.linux.x86_64.gnu.opt.a
-> compiling obj/O.linux.x86_64.gnu.opt/lib/lpi/lpi_spx.o
In file included from lib/spxinc/basevectors.h:30,
from lib/spxinc/spxlpbase.h:34,
from lib/spxinc/spxlp.h:24,
from lib/spxinc/spxsolver.h:30,
from src/lpi/lpi_spx.cpp:76:
lib/spxinc/rational.h:133: error: only declarations of constructors can be ‘explicit’
lib/spxinc/rational.h:136: error: only declarations of constructors can be ‘explicit’
In file included from src/lpi/lpi_spx.cpp:76:
lib/spxinc/spxsolver.h: In member function ‘void soplex::SPxSolver::setOutstream(soplex::SPxOut&)’:
lib/spxinc/spxsolver.h:383: error: ‘template<class R> class soplex::SPxLPBase’ used without template parameters
make[1]: *** [obj/O.linux.x86_64.gnu.opt/lib/lpi/lpi_spx.o] Error 1
gcc版本是4.4.7
我试过了:
make
make LEGACY=true
make ZLIB=false GMP=false READLINE=false LPSOPT=opt-gccold OPT=opt-gccold
我已经安装了GMP,ZLIB和READLINE库以及它们的开发库。
有什么建议么?
最佳答案
如果要使用gcc 4.4.7
编译SoPlex,则肯定需要设置LEGACY=true
(在SCIP中,您需要指定SPX_LEGACY=true
)。如果要在SCIP Optimization Suite中编译代码(推荐),则选项LEGACY=true
将相应地编译SCIP和SoPlex。
关于spxsolver.h
中的其他错误:请在383行中替换
SPxLPBase::spxout = &newOutstream;
与
SPxLP::spxout = &newOutstream;
显然,没有指定模板说明符(
gcc
实际上是SPxLP
),较新版本的SPxLPBase <Real>
不会抱怨这种用法。关于linux - 在Linux上编译SCIP Optimization Suite 3.2.0,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31225816/