Cplex library gcc compilation link error

天大地大妈咪最大 提交于 2019-12-03 21:53:26
Sourav Ghosh

The order of appearance of the library matters. Change your compilation statement to

gcc -I/opt/cplex-studio-125/cplex/include mipex1.c L/opt/cplex-studio-125/cplex/lib/x86-64_sles10_4.1/static_pic -lcplex

(Generic version)

gcc -I/<path> -L<path> <source.c> -l<lib>

to put the library after the source file, so that, linker will search the library for the function called from the source file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!