LNK1181: Unable to open input file 'm.lib'

When I try to install certain Python geophysical instrumentation, I get this error:

LINK: fatal error LNK1181: cannot open input file 'm.lib'

I believe this is due to the use of MSVC buildtools. In their setup.py I found:

 setup(…, ext_modules=[ Extension(…, […], libraries=['m'], … ]) 

What do I need to change in this setup.py - and related files? - to do this job. IIRC is a library other than m that I should use.

+6
source share
1 answer

On Windows, standard math functions are handled by MSVCR:

 >>> from ctypes.util import find_library >>> find_library('m') 'msvcr90.dll' 

I do not have MSVC installed for testing, but you just need to associate it with the runtime. Try removing the 'm' .

+1
source

Source: https://habr.com/ru/post/955837/


All Articles