LINK : fatal error LNK1158: cannot run 'rc.exe'
I am trying to use AppVeyor to build and publish 32 bit and 64 bit Python wheels for Windows. This was working well until recently when I decided to add building of Python 3.9 wheels. Because Python 3.9 is only available in the "Visual Studio 2019" image, I have specified that image in my appveyor.yaml
.
Switching to this image is now resulting in my builds failing with LINK : fatal error LNK1158: cannot run 'rc.exe'
- see here for an example failed build. The corresponding appveyor.yaml
file is available here.
Does anyone have any pointers to how I can fix this? I rarely have to use Windows, so my knowledge is limited on that platform.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 16 Jan, 2021 11:08 PM
Quick googling suggests copying
rc.exe
andrcdll.dll
to VC directory:https://www.tutorialexample.com/fix-python-pip-install-link-fatal-e...
https://stackoverflow.com/questions/14372706/visual-studio-cant-bui...
Can you try that?
2 Posted by jonathan.underw... on 16 Jan, 2021 11:34 PM
Well - those files don't exist at the same path as mentioned in that solution, and other ones like it. I could go hunting for those files in the image i suppose, but I wonder why they're not already on the PATH.
3 Posted by jonathan.underw... on 17 Jan, 2021 12:06 AM
So, based on one of the suggestions in the stackoverflow, I added this:
which seems to fix the problem and ensures the linker is found. However, I should probably be using some environment variable rather than hardcoding the "x64". But, some progress.