[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] [Fwd: help running glpk 4.52]

From: Andrew Makhorin
Subject: [Help-glpk] [Fwd: help running glpk 4.52]
Date: Wed, 24 Jul 2013 18:53:21 +0400

-------- Forwarded Message --------
From: Juan J. Rojas <address@hidden>
To: address@hidden
Subject: help running glpk 4.52
Date: Wed, 24 Jul 2013 10:46:46 -0400 (EDT)

Hello all,

I am trying to run a file called  example.cpp file that inlcudes a glpk.h:

#include <iostream>
using namespace std;

#include <stdlib.h>           /* C standard library                   */
#include <glpk.h>             /* GNU GLPK linear/mixed integer solver */
#include <vector>             // STL sequence container
#include <stdio.h>

int main (int argc, char * argv[])
        // declare variables
        glp_prob *lp;
        std::vector<int>    iav;
        std::vector<int>    jav;
        std::vector<double> arv;
        double Z, x1, x2, x3;
        int solver_ret;               
        // create problem
        lp = glp_create_prob();

        return 0;

I am compiling using:  g++ example.cpp -lglpk -o example

However, when I run the file ./example  I get:

error while loading shared libraries: cannot open shared object 
file: No such file or directory

I already check the documentation and the forums online. Do you know how could 
I solve this issue?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]