-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling on x86 Windows fails #237
Comments
hi. That link should not be necessary. I suspect there is an “user/operator error” here unfortunately. Sorry. Do a clean build. Show your command line, your entire build log and what kind of command prompt you were using, then maybe we can sort this out a little more. |
Thanks for the response. First via git-bash:
And then inside dev command prompt:
|
are you trying to do a cross compile for some reason? i think you may have opened the wrong kind of cmd.exe. this is what looks strange to me: /Hostx86/x64/ |
I'm not, no. This is on a 32-bit Windows 7 machine so everything should be 32-bit. |
I can also reproduce this on a clean VM with 32-bit Windows 10, version 2004 and Visual Studio 2019. I also see /Hostx86/x64/ in the compiler / linker path and I believe mbuild is somehow getting this wrong, and unfortunately even explicitly setting --vc-dir to the /Hostx86/x86/ equivalent does not help. Edit: so far, the only workaround I found was to set --cc --ar and --linker manually. |
This comment has been minimized.
This comment has been minimized.
I took some time to read the code and I think I know the reason now... @hatRiot I think you use Windows 32bit and CPU 64bit , but those python scrips assumes some vars such as here if you don't give the arguments. For your case , I guess the scripts want to compile 64bit program on 32bit OS. For me 's case , I use the default "VS Command Prompt " --- this is for x86!!! But I have Win64bit and CPU64bit. How to solve: Use the specific arguments with the py script no matter whatever you want to build. build 64bit program&lib: If still not work, see the verbose output(mfiles.py -v xx ) to check the arguments passed to the cl.exe and link.exe. |
Thanks, blackbeaf. (Or is it Mr.Beaf? :-) ) yes. which VS command prompt you open matters. Let me know if you are still encountering issues. |
Run from
Developer Command Prompt for VS 2017
:Note
Hostx86/x64/lib.exe
in the command path. I hacked around this by simply hard linkingHostx86/x64
toHostx86/x86
which then built just fine.The text was updated successfully, but these errors were encountered: