Hello, it looks like on this server (Debian) I can #39;t compile a file that I could compile and run on a Ubuntu laptop.
Can you help me? Thanks!! Antonio host:/usr/include/glpk-4.26/include# locate glpk.h /usr/include/glpk-4.26/include/glpk.h host:/usr/include/glpk-4.26/include# ls glpapi.h glpbfx.h glpgmp.h glpipm.h glplib.h glpluf.h glpmpl.h glprgr.h glpscg.h glpssx.h Makefile glpavl.h glpdmp.h glphbm.h glpipp.h glplpf.h glplux.h glppds.h glprng.h glpspm.h glpstd.h Makefile.am glpbfd.h glpfhv.h glpios.h glpk.h glplpp.h glpmat.h glpqmd.h glpscf.h glpspx.h glptsp.h Makefile.in host:/usr/include/glpk-4.26/include# cd / host:/# cd /home/algorithm/provaglpk/ host:/home/algorithm/provaglpk# gcc -o sample_binary sample.c -I/usr/include/glpk-4.26/include -lglpk /tmp/ccrjRX0i.o: In function `main #39;: sample.c:(.text+0xc): undefined reference to `glp_create_prob #39; sample.c:(.text+0x1e): undefined reference to `glp_set_prob_name #39; sample.c:(.text+0x2c): undefined reference to `glp_set_obj_dir #39; sample.c:(.text+0x3a): undefined reference to `glp_add_rows #39; sample.c:(.text+0x4d): undefined reference to `glp_set_row_name #39; sample.c:(.text+0x7d): undefined reference to `glp_set_row_bnds #39; sample.c:(.text+0x90): undefined reference to `glp_set_row_name #39; sample.c:(.text+0xc0): undefined reference to `glp_set_row_bnds #39; sample.c:(.text+0xd3): undefined reference to `glp_set_row_name #39; sample.c:(.text+0x103): undefined reference to `glp_set_row_bnds #39; sample.c:(.text+0x111): undefined reference to `glp_add_cols #39; sample.c:(.text+0x124): undefined reference to `glp_set_col_name #39; sample.c:(.text+0x13f): undefined reference to `glp_set_col_bnds #39; sample.c:(.text+0x166): undefined reference to `glp_set_obj_coef #39; sample.c:(.text+0x179): undefined reference to `glp_set_col_name #39; sample.c:(.text+0x194): undefined reference to `glp_set_col_bnds #39; sample.c:(.text+0x1bb): undefined reference to `glp_set_obj_coef #39; sample.c:(.text+0x1ce): undefined reference to `glp_set_col_name #39; sample.c:(.text+0x1e9): undefined reference to `glp_set_col_bnds #39; sample.c:(.text+0x210): undefined reference to `glp_set_obj_coef #39; sample.c:(.text+0x383): undefined reference to `glp_load_matrix #39; sample.c:(.text+0x391): undefined reference to `glp_simplex #39; sample.c:(.text+0x39a): undefined reference to `glp_get_obj_val #39; sample.c:(.text+0x3bb): undefined reference to `glp_get_col_prim #39; sample.c:(.text+0x3dc): undefined reference to `glp_get_col_prim #39; sample.c:(.text+0x3fd): undefined reference to `glp_get_col_prim #39; sample.c:(.text+0x474): undefined reference to `glp_delete_prob #39; collect2: ld returned 1 exit status
Hello, it looks like on this server (Debian) I can't compile a file that I could compile and run on a Ubuntu laptop.
Can you help me? Thanks!! Antonio
host:/usr/include/glpk-4.26/include# locate glpk.h
/usr/include/glpk-4.26/include/glpk.h
host:/usr/include/glpk-4.26/include# ls
glpapi.h glpbfx.h glpgmp.h glpipm.h glplib.h glpluf.h glpmpl.h glprgr.h glpscg.h glpssx.h Makefile
glpavl.h glpdmp.h glphbm.h glpipp.h glplpf.h glplux.h glppds.h glprng.h glpspm.h glpstd.h Makefile.am
glpbfd.h glpfhv.h glpios.h glpk.h glplpp.h glpmat.h glpqmd.h glpscf.h glpspx.h glptsp.h Makefile.in
host:/usr/include/glpk-4.26/include# cd /
host:/# cd /home/algorithm/provaglpk/
host:/home/algorithm/provaglpk# gcc -o sample_binary sample.c -I/usr/include/glpk-4.26/include -lglpk
/tmp/ccrjRX0i.o: In function `main':
sample.c:(.text+0xc): undefined reference to `glp_create_prob'
sample.c:(.text+0x1e): undefined reference to `glp_set_prob_name'
sample.c:(.text+0x2c): undefined reference to `glp_set_obj_dir'
sample.c:(.text+0x3a): undefined reference to `glp_add_rows'
sample.c:(.text+0x4d): undefined reference to `glp_set_row_name'
sample.c:(.text+0x7d): undefined reference to `glp_set_row_bnds'
sample.c:(.text+0x90): undefined reference to `glp_set_row_name'
sample.c:(.text+0xc0): undefined reference to `glp_set_row_bnds'
sample.c:(.text+0xd3): undefined reference to `glp_set_row_name'
sample.c:(.text+0x103): undefined reference to `glp_set_row_bnds'
sample.c:(.text+0x111): undefined reference to `glp_add_cols'
sample.c:(.text+0x124): undefined reference to `glp_set_col_name'
sample.c:(.text+0x13f): undefined reference to `glp_set_col_bnds'
sample.c:(.text+0x166): undefined reference to `glp_set_obj_coef'
sample.c:(.text+0x179): undefined reference to `glp_set_col_name'
sample.c:(.text+0x194): undefined reference to `glp_set_col_bnds'
sample.c:(.text+0x1bb): undefined reference to `glp_set_obj_coef'
sample.c:(.text+0x1ce): undefined reference to `glp_set_col_name'
sample.c:(.text+0x1e9): undefined reference to `glp_set_col_bnds'
sample.c:(.text+0x210): undefined reference to `glp_set_obj_coef'
sample.c:(.text+0x383): undefined reference to `glp_load_matrix'
sample.c:(.text+0x391): undefined reference to `glp_simplex'
sample.c:(.text+0x39a): undefined reference to `glp_get_obj_val'
sample.c:(.text+0x3bb): undefined reference to `glp_get_col_prim'
sample.c:(.text+0x3dc): undefined reference to `glp_get_col_prim'
sample.c:(.text+0x3fd): undefined reference to `glp_get_col_prim'
sample.c:(.text+0x474): undefined reference to `glp_delete_prob'
collect2: ld returned 1 exit status
_______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
