使用CImg:LNK1181:无法打开文件“m.lib”在窗口7 x64 [英] Using CImg: LNK1181: cannot open file "m.lib" on windows 7 x64

查看:995
本文介绍了使用CImg:LNK1181:无法打开文件“m.lib”在窗口7 x64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在CImg Makefile我注意到一个标志-lm我认为这指向m.lib文件。但是由于某种原因,它在链接阶段找不到它。我使用以下命令编译代码:

In the CImg Makefile I notice a flag "-lm" I think this points to the m.lib file. But for some reason it cannot find it during the Linking phase. I am compiling the code using the following command:

nvcc -o FilledTriangles FilledTriangles.cu -I.. -O2 -lm -lgdi32

nvcc只是nvidia CUDA编译器。它的功能类似于g ++

"nvcc" is just the nvidia CUDA compiler. It should function similar to g++

推荐答案

-lm指libm.so

-lm refers to "libm.so"

通常,-lXYZ是一种告诉链接器它应该解析你的编译代码中的符号对libXYZ.so(定位后,通常在/ usr / lib)。

In general, -lXYZ is a way of telling the linker that it should resolve the symbols in your compiled code against libXYZ.so (after locating it, usually in /usr/lib).

这篇关于使用CImg:LNK1181:无法打开文件“m.lib”在窗口7 x64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆