python - LNK1181: cannot open input file 'm.lib'错误解决

把setup.py中的libraries=["m"]删除即可

cec2013lsgo网页:https://pypi.org/project/cec2013lsgo/

改好的安装文件下载链接https://pan.baidu.com/s/1vbuxff6eA5oRMaXNzDrl2w

cmd进入下载文件所在的更目录下,运行python setup.py install

测试代码

from cec2013lsgo.cec2013 import Benchmark
bench = Benchmark()
bench.get_info(1)
print(bench.get_info(1))

from numpy.random import rand
info = bench.get_info(1)
dim = info['dimension']
sol = info['lower']+rand(dim)*(info['upper']-info['lower'])
fun_fitness = bench.get_function(1)
fun_fitness(sol)
print(fun_fitness(sol))
测试结果

cec2013lsgo安装python - LNK1181: cannot open input file 'm.lib'

cec2013lsgo安装python - LNK1181: cannot open input file 'm.lib'


相关文章: