Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  LINK : fatal error LNK1181: cannot open input file '.obj'

    Posted Mon May 23, 2011 06:57 PM

    Originally posted by: y82li


    Could you please help me out. I am using x64-windows-vs2008, and got the error

    LINK : fatal error LNK1181: cannot open input file '.obj'

    Please help me out.

    Thank you very much!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: LINK : fatal error LNK1181: cannot open input file '.obj'

    Posted Tue May 24, 2011 03:58 AM

    Originally posted by: SystemAdmin


    This is rather off-topic. I don't think that your problem has anything to do with CPLEX.
    It looks like you have specified an invalid linker command. You should inspect the linker command that is used and compare it against what you expect. In particular, look for '.obj' in the linker command line and check what should be there instead. Probably you can fix the problem by just fixing the linker configuration.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: LINK : fatal error LNK1181: cannot open input file '.obj'

    Posted Tue May 24, 2011 04:15 PM

    Originally posted by: y82li


    Thank you Daniel,
    I appreciate if you could check my setting below at Linker\Command Line\All Options:

    /OUT:"C:\ILOG\myapp\project in Windows 7\test\Release\test.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"Release\test.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\ILOG\myapp\project in Windows 7\test\Release\test.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT wsock32.lib;C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\lib\x64_windows_vs2008\stat_mta\cplex122.lib;C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\lib\x64_windows_vs2008\stat_mta\ilocplex.lib;C:\ILOG\CPLEX_Studio_AcademicResearch122\concert\lib\x64_windows_vs2008\stat_mta\concert.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

    and at Linker\Input\All dependencies:
    wsock32.lib;C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\lib\x64_windows_vs2008\stat_mta\cplex122.lib;C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\lib\x64_windows_vs2008\stat_mta\ilocplex.lib;C:\ILOG\CPLEX_Studio_AcademicResearch122\concert\lib\x64_windows_vs2008\stat_mta\concert.lib
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: LINK : fatal error LNK1181: cannot open input file '.obj'

    Posted Tue May 24, 2011 05:10 PM

    Originally posted by: SystemAdmin


    Hm, I am not an expert in linking on Windows but these semicolons look a little suspicious. Does the problem persist if you replace all ';' in the linker's additional dependencies by blanks? Or even by line feeds? I usually put one additional dependency per line in the configuration.

    And by the way, why don't you proceed as described in c_cpp.html:
    1. Go to Linker->General->Additional Library Directories and add C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\lib\x64_windows_vs2008\stat_mta and C:\ILOG\CPLEX_Studio_AcademicResearch122\concert\lib\x64_windows_vs2008\stat_mta.
    2. Go to Linker->Input->Additional Dependencies and add cplex122.lib ilocplex.lib concert.lib (each library on its own line).
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: LINK : fatal error LNK1181: cannot open input file '.obj'

    Posted Tue May 24, 2011 10:28 PM

    Originally posted by: y82li


    Hi, Daniel,
    Thank you. This problem was solved, but, again, I see the following:
    1>Linking...
    1>concert.lib(iloconstraint.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

    Any idea? Thank you for your help!
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: LINK : fatal error LNK1181: cannot open input file '.obj'

    Posted Wed May 25, 2011 08:09 AM

    Originally posted by: y82li


    Thank you! I give up x64 already. I just downloaded and installed cplex x86 version. Now my code works. x64 ruined my long weekend anyhow.
    #CPLEXOptimizers
    #DecisionOptimization