[Scip] Linking error in Windows

Shahin Gelareh shahin.gelareh at gmail.com
Sun Oct 6 20:28:03 CEST 2013


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> 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: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@**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
>> 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
> http://listserv.zib.de/**mailman/listinfo/scip<http://listserv.zib.de/mailman/listinfo/scip>
>



--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20131006/f0fd1ef9/attachment.html>


More information about the Scip mailing list