Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CPLEX+Visual Studio 0xc000007b error

    Posted Fri November 19, 2010 05:01 PM

    Originally posted by: M.Lavanya


    Hi,

    I'm running CPLEX 121 on Windows 7 on a 64-bit machine, by interfacing it with Visual Studio 2008. I've been trying to get the CPLEX examples to work. (This error does not appear when I use Visual Studio without CPLEX.) So far I've been able to compile code from the examples (I tried blend.cpp) and it compiles. However, when I try to run it, immediately I see a new window with the following message:

    "The application was unable to start correctly (0xc000007b). Click OK to close the application"

    I created a new project and solution because I suspected that the version of solutions I downloaded from IBM ILOG might have been created on a different configuration. In creating the project and solution, I followed instructions from IBM ILOG given in the downloaded file:///C:/Program%20Files%20%28x86%29/ILOG/CPLEX121/c_cpp.html; under the heading 'Building Your Own Project which Links with CPLEX'. Some forums suggested installing the Service Pack for Visual Studio, but that did not help either.

    I have no idea why this is happening. Can someone help? Thanks in advance!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Mon November 22, 2010 04:22 AM

    Originally posted by: SystemAdmin


    Does this happen only for C++ examples or also for C examples?
    Can you use a debugger to get more information about the failure?
    Are you using 32bit or 64bit CPLEX? What exact CPLEX port are you using?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Wed November 24, 2010 09:13 AM

    Originally posted by: M.Lavanya


    Hi Daniel,

    Thanks for your reply. Here are my answers to your questions.

    1. This error comes up even for C examples.

    2. I built the same program after changing the build configuration to 'Debug' mode in Visual Studio (instead of in 'Release' mode as recommended by the CPLEX instructions) and the same error recurred. This happens immediately after pressing the Debug button, with nothing appearing on the command line, so I couldn't find out what is happening.

    3. I downloaded the version that IBM sent me after mentioning that my machine is a 64-bit machine. It might be 32-bit CPLEX, but I am not sure how to find out. I am also not sure which port I am using. How do I find these out?

    Thanks,
    Lavanya.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Wed November 24, 2010 10:20 AM

    Originally posted by: M.Lavanya


    Daniel,

    I believe the port is 'x64_windows _vs2008'. Does this throw more light on the error?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Wed November 24, 2010 10:43 AM

    Originally posted by: SystemAdmin


    Not really :-(
    Just to make sure: Did you proceed exactly as described in the file c_cpp.html?
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Wed November 24, 2010 11:15 AM

    Originally posted by: SystemAdmin


    To be more precise, did you do the following:
    • In VS2008 select File->Open->Project/Solution.
    • Go to CPLEXDIR\examples\x64_windows_vs2008\stat_mta
    • Select examples.sln
    • In VS2008 in the solution explorer select blend
    • Select Build->Build blend and wait for completion
    • In the command prompt (or on the command line)
    set path=%path%;CPLEXDIR\bin\x64_win64
    CPLEXDIR\examples\x64_windows_vs2008\stat_mta\blend
    

    Of course CPLEXDIR must be replaced by the directory in which CPLEX is installed.
    By the way, what does 'echo %path%' produce right after the 'set' command?
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Wed November 24, 2010 04:42 PM

    Originally posted by: M.Lavanya


    Daniel,

    It works now. What I hadn't realized is that I cannot run it from the Visual Studio 'Run' command, or by just double-clicking on the .exe file. When I ran it from the Visual Studio prompt, it worked.

    If I want to run something from the Visual Studio editor, I should probably denote the project as something different, not a Console Project. Do you know how to run it from the editor?

    Thanks for your help!
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Thu November 25, 2010 02:04 AM

    Originally posted by: SystemAdmin


    I am not really an expert in Visual Studio, sorry. My best guess is that you had trouble running it from the editor since it did not find the library. Is that possible?
    You can easily test: Run from the command prompt without setting the path. If that produces the same error as before then the problem is indeed that the (correct) library is not found. To overcome this you can change the path variable globally via My Computer->Properties->Advanced->Environment Variables. Note that after doing this change you must restart Visual Studio.
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: CPLEX+Visual Studio 0xc000007b error

    Posted Thu November 25, 2010 08:58 AM

    Originally posted by: M.Lavanya


    Sure. I will try that. Thanks!
    #CPLEXOptimizers
    #DecisionOptimization