[Scip] Linking error in Windows

Ambros Gleixner gleixner at zib.de
Mon Oct 7 12:19:07 CEST 2013


Hi Shahin,

the C++ wrapper classes and the memory management methods were not 
declared as to be exported into the dlls until now.  We will correct 
this and make new libraries available as soon as possible.

With the new libraries, we will also fix the issue with the NDEBUG flag: 
then it should work independently of declaring this flag.

Kind regards,

Ambros


Am 06.10.2013 20:28, schrieb Shahin Gelareh:
> Hi Ambros
>
> I use the VS libs from SCIP and not mine. I use in fact
> "scip-3.0.0.win.x86.vc10.opt.spx.mt.lib" which sounds like to be for the
> release mode.
>
> But the following part is still there.
>
> 1>src\pricer_vrp.cpp(260): warning C4996: 'strncpy': This function or
> variable may be unsafe. Consider using strncpy_s instead. To disable
> deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
> 1>          c:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
> 1>main_vrp.obj : error LNK2001: unresolved external symbol "enum
> SCIP_Retcode __cdecl SCIPincludeObjPricer(struct Scip *,class
> scip::ObjPricer *,unsigned int)"
> (?SCIPincludeObjPricer@@YA?AW4SCIP_Retcode@@PAUScip@@PAVObjPricer at scip@@I at Z)
> 1>pricer_vrp.obj : error LNK2001: unresolved external symbol
> _BMSduplicateMemory_call
> 1>pricer_vrp.obj : error LNK2001: unresolved external symbol
> _BMSfreeMemory_call
> 1>D:\work\codes\SCIP\scipoptsuite-3.0.1\scip-3.0.1\examples\VRP2\Release\VRP2.exe
> : fatal error LNK1120: 3 unresolved externals
>
> best regards,
> Shahin
>
>
>
>
>
>
>
> On Sun, Oct 6, 2013 at 7:32 PM, Ambros Gleixner <gleixner at zib.de
> <mailto:gleixner at zib.de>> wrote:
>
>     Hi Shahin,
>
>     are you using the VS libs from the SCIP website or did you build
>     SCIP on your own?
>
>     SCIPinfinity() is different in debug and optimized mode.  When you
>     compile with the NDEBUG flag, SCIPinfinity() becomes a macro and is
>     not available as a function.
>
>     Your problem might be, that your SCIP lib is built in optimized mode
>     (with NDEBUG), but your VRP code in debug mode.  Can you try adding
>     NDEBUG to your compiler flags?
>
>     ambros
>
>
>
>     Am 05.10.2013 20 <tel:05.10.2013%2020>:32, schrieb Shahin Gelareh:
>
>         Dear Scippers
>
>         I successfully compile the VRP on VS2010 windows  but during the
>         linking
>         process I get  the error message below.
>
>         It seems like e.g. "SCIPinfinity " is not known even when I add the
>         header file containing it. Also some other external symbols are
>         not found.
>         The code is compiled as C++ in VS2010.
>         is there any compiled flag to be set? any preprocessor?
>
>         I appreciate the constructive comments.
>
>         kind regards,
>         Shahin
>
>         1>------ Build started: Project: VRP, Configuration: Debug Win32
>         ------
>         1>main_vrp.obj : error LNK2019: unresolved external symbol
>         _BMScheckEmptyMemory_call referenced in function _main
>         1>main_vrp.obj : error LNK2019: unresolved external symbol "enum
>         SCIP_Retcode __cdecl SCIPincludeObjPricer(struct Scip *,class
>         scip::ObjPricer *,unsigned int)"
>         (?SCIPincludeObjPricer@@YA?__AW4SCIP_Retcode@@PAUScip@@__PAVObjPricer at scip@@I at Z)
>         referenced in function _main
>         1>main_vrp.obj : error LNK2019: unresolved external symbol
>         _SCIPinfinity
>         referenced in function _main
>         1>pricer_vrp.obj : error LNK2001: unresolved external symbol
>         _SCIPinfinity
>         1>pricer_vrp.obj : error LNK2019: unresolved external symbol
>         _BMSduplicateMemory_call referenced in function "public: __thiscall
>         scip::ObjPricer::ObjPricer(__struct Scip *,char const *,char const
>         *,int,unsigned int)" (??0ObjPricer at scip@@QAE at __PAUScip@@PBD1HI at Z)
>         1>pricer_vrp.obj : error LNK2019: unresolved external symbol
>         _BMSfreeMemory_call referenced in function "public: virtual
>         __thiscall
>         scip::ObjPricer::~ObjPricer(__void)" (??1ObjPricer at scip@@UAE at XZ)
>         1>pricer_vrp.obj : error LNK2019: unresolved external symbol
>         _SCIPisNegative referenced in function "public: enum SCIP_Retcode
>         __thiscall ObjPricerVRP::pricing(struct Scip *,bool)"
>         (?pricing at ObjPricerVRP@@QAE?__AW4SCIP_Retcode@@PAUScip@@_N at Z__)
>         1>pricer_vrp.obj : error LNK2019: unresolved external symbol
>         _SCIPvarGetUbLocal referenced in function "protected: bool
>         __thiscall
>         ObjPricerVRP::have_edge(int,__int)const "
>         (?have_edge at ObjPricerVRP@@IBE___NHH at Z)
>         1>D:\work\codes\SCIP\__scipoptsuite-3.0.1\scip-3.0.1\__examples\VRP\Debug\VRP.exe
>         : fatal error LNK1120: 7 unresolved externals
>         ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>         ==========
>
>
>
>         --
>
>
>
>
>         _________________________________________________
>         Scip mailing list
>         Scip at zib.de <mailto:Scip at zib.de>
>         http://listserv.zib.de/__mailman/listinfo/scip
>         <http://listserv.zib.de/mailman/listinfo/scip>
>
>
>     --
>     ______________________________________________________________
>     Ambros M. Gleixner
>     Zuse Institute Berlin - Matheon - Berlin Mathematical School
>     http://www.zib.de/gleixner
>     _________________________________________________
>     Scip mailing list
>     Scip at zib.de <mailto:Scip at zib.de>
>     http://listserv.zib.de/__mailman/listinfo/scip
>     <http://listserv.zib.de/mailman/listinfo/scip>
>
>
>
>
> --
>
>

-- 
____________________________________________________________
Ambros M. Gleixner
Zuse Institute Berlin - Matheon - Berlin Mathematical School
http://www.zib.de/gleixner


More information about the Scip mailing list