How to link GLPK with sublime text?

49 views Asked by At

I wanted to solve some Linear programming problems using C++ in sublime text (as I usually code there).

Here is my builder file in sublime Text:

{
    "cmd": ["g++.exe", "-std=c++17", "${file}",
            "-o", "${file_base_name}.exe",
            "&&", "${file_base_name}.exe<input.txt>output.txt"],
    "shell":true,
    "working_dir":"$file_path",
    "selector":"source.cpp"
}

I downloaded GLPK package and changed builder file as:

{
    "cmd": ["g++.exe", "-std=c++17", "${file}",
            "-o", "${file_base_name}.exe", "-lglpk",
            "&&", "${file_base_name}.exe<input.txt>output.txt"],
    "shell": true,
    "working_dir": "$file_path",
    "selector": "source.cpp"
}

But it says that glpk can not be found even after setting the system variable path.

:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lglpk

Can someone give steps for setting the glpk to be used with normal C++ code?

0

There are 0 answers