Login  Register

[SwingOption - glpk] How to include glpk properly in VC++?

Posted by Dennis Zhang on Sep 04, 2011; 7:19pm
URL: http://quantlib.414.s1.nabble.com/SwingOption-glpk-How-to-include-glpk-properly-in-VC-tp6056.html

I am trying to repdouce the code at the Klaus Blog. After updating via SVN Trunk, I still have the following error messages related to GLPK. The version I am using is v4.34 via the following link (an GNU installer for Windows). The version should not be a problem since the code runs okay based on glpk v4.25 (told by Klaus). I wonder if I configure it correctly in VC++ 2008.

http://gnuwin32.sourceforge.net/packages/glpk.htm 

In my understanding, there are two ways to include GLPK in VC++, either through the current project (the same way to include QuantLib) or through Tools->OPtions (the same way to include Boost). I am not sure why this is happening and any comment/suggestion will be great~! Thanks!

1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_create_prob
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_prob_name
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_obj_dir
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_add_rows
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_row_name
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_row_bnds
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_add_cols
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_col_name
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_col_bnds
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_load_matrix
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_init_smcp
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_set_obj_coef
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_simplex
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_get_status
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_get_obj_val
1>SwingOptionTest1.obj : error LNK2001: unresolved external symbol _glp_delete_prob