MSVCP140.dll is valid error
MSVCP140.dll is valid error
New PB user here. Trying to run my first simple program on my windows 10 PC and am getting this dialog message on start up:
"MSVCP140.dll is valid, but is for machine type other than current machine."
How do I fix this?
Thank you...
"MSVCP140.dll is valid, but is for machine type other than current machine."
How do I fix this?
Thank you...
Re: MSVCP140.dll is valid error
Which PB version do you use (x86, x64) ? Does the IDE launch ?
Re: MSVCP140.dll is valid error
What is your first simple program?
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: MSVCP140.dll is valid error
I was just using the form builder and bringing up a blank window form.
Re: MSVCP140.dll is valid error
Yes, the IDE launches fine. x64 Windows 10.
Re: MSVCP140.dll is valid error
It looks like this is really a FAsm.exe 'machine type' mis-match error. Is there some place where I can change my machine type for FAsm.exe?
Re: MSVCP140.dll is valid error
May be an antivirus issue. Why do you think it could be fasm ?
Re: MSVCP140.dll is valid error
I'm re-reading the dialog error again (below) and it's not FAsm.exe. It's a machine type mis-match within the 140.dll file. So does that mean the 140.dll file that I have for my windows 10 is a 32 bit version but I'm using a 64 bit windows 10 version?
(I turned off my anti-virus and it made no difference).

(I turned off my anti-virus and it made no difference).

Re: MSVCP140.dll is valid error
Hum, FASM doesn't depends of MVCP140.dll but lld-link does. I have compiled another version of lld-link for PureBasic x64 without these dependencies dans also much smaller, could you give it a try ? (you need to replace it in the PureBasic\Compilers\ dir)
https://www.purebasic.com/beta/windows_x64/lld-link.exe
https://www.purebasic.com/beta/windows_x64/lld-link.exe
Re: MSVCP140.dll is valid error
I copied that file into PureBasic/Compilers folder and ran one of the example programs and got the same error dialog 
Re: MSVCP140.dll is valid error
Doesn't that dialog message mean I have the wrong 140.dll file for my 64bit CPU?
Re: MSVCP140.dll is valid error
We ship the correct version with the PB package, could you upload your DLL somewhere to see if it's the x86 version?
Re: MSVCP140.dll is valid error
So the .dll should be the x86 version?
Where do I upload the file to and how do I check if its x86?
Where do I upload the file to and how do I check if its x86?
Re: MSVCP140.dll is valid error
I checked the 140.dll file in the PureBasic\compilers folder and it's a 64 bit file.


Re: MSVCP140.dll is valid error
I tested the new lld-link and followed it up with procmon.Fred wrote: Fri Sep 06, 2024 1:55 pm Hum, FASM doesn't depends of MVCP140.dll but lld-link does. I have compiled another version of lld-link for PureBasic x64 without these dependencies dans also much smaller, could you give it a try ? (you need to replace it in the PureBasic\Compilers\ dir)
It does the job and looks very good
Really Much lighter (30 vs 84 Mb) and without the dependencies to msvcp140.dll, vcruntime140.dll, vcruntime140_1.dll
With this new version,I had no problems before with msvcp140.dll, but there shouldn't be any now, msvcp140.dll is no longer used at all.
The 3 dlls in the Compilers folder can be deleted (saved)


