We present Linprog, a SWI-Prolog library for linear and mixed-integer linear programming that overcomes the current reliability limitations of the CLP(Q,R) libraries.Linprog uses the GNU Linear Programming Kit (GLPK) as a computational backend while maintaining compatibility with the CLP(Q,R) interface, enabling users to adopt it without modifying their existing Prolog code. Besides full compatibility with CLP(Q,R) libraries, Linprog also provides features to deal with unbounded or infeasible problems.A modular architecture allows for future integration of alternative solvers.Evaluation on over 1,200 test cases and standard LP/MILP benchmarks demonstrates that Linprog improves reliability while delivering competitive performance.