[英]Using CImg: LNK1181: cannot open file “m.lib” on windows 7 x64
In the CImg Makefile I notice a flag "-lm" I think this points to the m.lib file. 在CImg Makefile中,我注意到一个标志“ -lm”,它指向m.lib文件。 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" is just the nvidia CUDA compiler. “ nvcc”只是nvidia CUDA编译器。 It should function similar to g++
它的功能应类似于g ++
-lm refers to "libm.so" -lm表示“ libm.so”
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). 通常,-lXYZ是一种告诉链接器它应根据libXYZ.so(在定位后,通常在/ usr / lib中)解析已编译代码中符号的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.