Results 1 to 2 of 2

Thread: A problem using cplex with visual c++ 2008

  1. #1
    Join Date
    May 2011
    Posts
    1

    A problem using cplex with visual c++ 2008

    Hi everyone!

    thanks for your time reading this, I'm a total noob in cplex, actually I start a manual, but I can't even start the "hello world"...

    I'm using visual c++ 2008 express with CPLEX studio preview 12.2

    the code is:
    #include <ilcplex/ilocplex.h>
    ILOSTLBEGIN
    int main(int, char**) {
    IloEnv env;
    try {
    env.out() << "Hola Mundo" << endl;
    }
    catch (IloException& ex) {
    cerr << "Error: " << ex << endl;
    }
    catch (...) {
    cerr << "Error" << endl;
    }
    env.end();
    return 0;
    }

    The build log is:
    Build Log


    Build started: Project: ilogproyecto, Configuration: Release|Win32

    Command Lines


    Creating temporary file "c:\Users\OWNER\Documents\Visual Studio 2008\Projects\ilogproyecto\ilogproyecto\Release\RSP00000253363568.rsp" with contents
    [
    /OUT:"C:\Users\OWNER\Documents\Visual Studio 2008\Projects\ilogproyecto\Release\ilogproyecto.exe" /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:"Release\ilogproyecto.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\OWNER\Documents\Visual Studio 2008\Projects\ilogproyecto\Release\ilogproyecto.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 C:\ILOG\CPLEX_Studio_Preview122\cplex\lib\x64_windows_vs2008\stat_mda\cplex122.lib C:\ILOG\CPLEX_Studio_Preview122\cplex\lib\x64_windows_vs2008\stat_mda\ilocplex.lib C:\ILOG\CPLEX_Studio_Preview122\concert\lib\x64_windows_vs2008\stat_mda\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

    ".\Release\archivoc++.obj"
    ]
    Creating command line "link.exe @"c:\Users\OWNER\Documents\Visual Studio 2008\Projects\ilogproyecto\ilogproyecto\Release\RSP00000253363568.rsp" /NOLOGO /ERRORREPORTROMPT"

    Output Window


    Linking...
    archivoc++.obj : error LNK2001: unresolved external symbol "public: __thiscall IloEnvI::~IloEnvI(void)" (??1IloEnvI@@QAE@XZ)
    archivoc++.obj : error LNK2001: unresolved external symbol "public: __thiscall IloEnv::IloEnv(void)" (??0IloEnv@@QAE@XZ)
    C:\Users\OWNER\Documents\Visual Studio 2008\Projects\ilogproyecto\Release\ilogproyecto.exe : fatal error LNK1120: 2 unresolved externals

    Results


    Build log was saved at "file://c:\Users\OWNER\Documents\Visual Studio 2008\Projects\ilogproyecto\ilogproyecto\Release\BuildLog.htm"
    ilogproyecto - 3 error(s), 0 warning(s)



    THANKS PEOPLE

  2. #2
    Join Date
    Jan 2006
    Posts
    605

    Re: A problem using cplex with visual c++ 2008

    I think that you must use Cplex.out() in the par:
    if (cplex.solve()) {
    cplex.out()<< " Optimal Value = " << cplex.getObjValue() << endl;
    }
    and.. you mast call IloCplex cplex(mod);

Similar Threads

  1. help on visual basic 2008
    By gladys_ny in forum Software Development
    Replies: 1
    Last Post: 18-03-2011, 04:25 AM
  2. Replies: 2
    Last Post: 16-02-2011, 02:49 PM
  3. Difference between Visual studio 2005 and Visual studio 2008
    By RohanS in forum Software Development
    Replies: 3
    Last Post: 12-06-2009, 10:48 AM
  4. C++ with Visual C++ 2008
    By avvia in forum Software Development
    Replies: 3
    Last Post: 27-02-2009, 02:21 PM
  5. What is Visual Studio 2008
    By Jackie in forum Software Development
    Replies: 1
    Last Post: 23-12-2008, 05:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,715,572,613.66284 seconds with 17 queries