简体   繁体   English

使用CImg:LNK1181:无法在Windows 7 x64上打开文件“ m.lib”

[英]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.

相关问题 C ++ CMake链接错误:LNK1181:无法打开输入文件“ x.lib” - C++ CMake Linking error: LNK1181: Cannot open input file “x.lib” 错误LNK1181:无法打开输入文件'kernel32.lib' - error LNK1181: cannot open input file 'kernel32.lib' 链接:致命错误LNK1181:无法打开输入文件'libclamav.lib' - LINK : fatal error LNK1181: cannot open input file 'libclamav.lib' 错误 LNK1181 无法打开输入文件“mfcs110.lib” - Error LNK1181 cannot open input file 'mfcs110.lib' Qt 5.5.1 MSVC 2013,32位-LNK1181:无法打开输入文件'NIDAQmx.lib' - Qt 5.5.1 MSVC 2013, 32 bit - LNK1181: cannot open input file 'NIDAQmx.lib' LNK1181:无法打开输入文件“ oraocci10.lib” - LNK1181: cannot open input file 'oraocci10.lib' 错误 LNK1181:编译为 .LIB 时无法打开输入文件 - Error LNK1181: cannot open input file when compiling as .LIB (CMake构建)致命错误LNK1181:无法打开输入文件'glew.lib' - (CMake build) fatal error LNK1181: cannot open input file 'glew.lib' 链接:致命错误LNK1181:无法打开输入文件'cv.lib' - LINK : fatal error LNK1181: cannot open input file 'cv.lib' 链接:致命错误 LNK1181:无法打开输入文件“opencv_world341d.lib” - LINK : fatal error LNK1181: cannot open input file 'opencv_world341d.lib'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM