简体   繁体   中英

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. 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. It should function similar to g++

-lm refers to "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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM