Steps to install and run lpsolve on a Windows machine using the command line (cmd)

  1. Download lpsolve for 64-bit Windows.


  2. (For 32-bit Windows: Download lpsolve for 32-bit Windows.

    I'll assume you download things to your Downloads folder.

  3. Go to your Downloads folder.
  4. You should see a file with a name like

    lp_solve_5.5.2.11_exe_win64
    This is a compressed (zipped) file containing lpsolve.

    Double-click on this file to uncompress this file into the Downloads folder

  5. Click Start, type cmd and hit enter to open a command line window.
  6. In the command line window, change the directory to the Downloads using the following commands:
    cd Downloads
    cd lp_solve_5.5.2.11_exe_win64
    
  7. Now you are in the directory with the executable lpsolve: if you list the files in the directory with the dir command, you will see the file lp_solve.exe here.
  8. You will need a text file containing an LP to try out lpsolve.

    Download this example lp file, test.lp, and put it in the same directory as lp_solve.
  9. On the command line, enter the command
    lp_solve test.lp
    
    and lpsolve will run and produce this output:
    Value of objective function: 4.61764706
    
    Actual values of the variables:
    x                         3.58824
    y                         1.02941
    
    If you see this output, congratulations! You have successfully installed and run lpsolve.
  10. You can move the file lp_solve.exe to any directory you like. Note that it needs to be in the same folder as your LP file in order for the command
    lp_solve myfile.lp
    to work.