MSVCR100D.dll missing when running Allegro project in debug - visual-studio

I have Allegro 5 set up with VS2012 on Windows 8 and am trying to compile the sample code from the Allegro wiki. I have installed VC++ 2010 Redist. (both x86 and x64) and I am able to build/run the project in release just fine.
The issue is that when trying to run it in debug it crashes complaining that MSVCR100D.dll is missing. It was my understanding that the non-debug and debug versions of this dll should be included with VC++ 2010? Any ideas on how to fix this other than just downloading the dll from somewhere and dropping it in manually?

I would guess that you are using a binary package of Allegro built for VC++ 2010 (v10). You should be using the ones for 2012 (v11) or compile from source by yourself. Mixing runtimes is not advisable.
Allegro 5.0.8 is the first to have binaries for v11 and while normally they would be up at http://www.allegro.cc/files, they currently are only available at the release announcement thread.

Related

dll library with cpprestsdk compilation on windows xp

I have dll project using cpprestsdk in visual studio 2019 (along with console application for testing purposes).
On windows 7 and windows 10 original package works as expected, however I'm having hard time to compile and run on windows XP.
cpprestsdk is included in the project through NuGet, version: cpprestsdk.v141 but, its not visible for the compiler. Line #include <cpprest/http_client.h> throws an error.
Changes i've made:
platform toolset set to Visual Studio 2017 - Windows XP (v141_xp)
preprocessor definitions updated to include CPPREST_TARGET_XP
statically included cpprest141_2_10.dll
statically linked cpprest141_2_10.lib
console application setting ConformanceMode set to false
Now the app is compiling, but it's not working properly on windows 10 (crashes on sending request). and it's not starting on windows XP (dll entry point not found)
Any1 have any idea what's going on?
#edit:
after adding to program folder missing dlls:
api-ms-win-core-crt-l1-1-0.dll
api-ms-win-core-crt-l2-1-0.dll
httpapi.dll
it came to ntdll.dll
Entry Point Not Found error screenshot
The procedure entry point WinSqmAddToStreamEx could not be located in the dynamic link library ntdll.dll
all you need to do is downgrade your Visual studio to 2013 and donwload the version of cpprest SDK like 2.9.1 which support the VS 2013 (msvc 120) as well, hope it helps

Build ATL VS2010 project on CI server

I need to build VS2010 C++ ATL project on CI server with no VS2010 installed.
The project can be successfully built on developers machine with VS2010 installed. But VS2010 cannot be installed to CI servers because that requires a license.
So, for now I'm trying the following approach:
Installed VS2010 Express
Installed Microsoft Windows SDK for Windows 7
Installed Windows Driver Kit (it includes ATL and MFC)
Although I have ATL headers and libs installed on the CI machine, I'm getting the following errors:
error C2039: 'AtlSetPerUserRegistration' : is not a member of 'ATL'
error C3861: 'AtlSetPerUserRegistration': identifier not found
I compared atlbase.h headers from VS2010 installation and from WDK. They are different:
- atlbase.h from VS2010 installation does have AtlSetPerUserRegistration definition;
- atlbase.h from WDK installation does not have it.
That causes an error mentioned above.
The question is: how to configure CI build machine for building ATL projects without installing VS2010?
Update:
Checking atldef.h file I found the following:
VS2010 version has the line:
#define _ATL_VER 0x0A00 // Active Template Library version 10.00
and WDK version has the line:
#define _ATL_VER 0x0800 // Active Template Library version 8.00
So, WDK ATL version differs from the VS2010 ATL version. That's why they're not 100% compatible.
Now the question is: How to get ATL v10.0 on the build server without having VS2010 installed?
In case if anyone else meets the same issue, here is a workaround:
The required version of ATL is available on developers machine with VS2010 installed (e.g. VS2010 Professional).
It is located in the folder %VCINSTALLDIR%ATLMFC.
By default it is c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
Folder ATLMFC can be copied to the build server by hands into %VCINSTALLDIR%, where VS2010 Express is installed. And that makes build server able to build VS2010 ATL projects without installing VS2010.
Though this is a workaround. And I'd like to see better solution if any. So, I'm not accepting my answer.

mfc120.dll missing for an application built in VS2013

I have a VC++ based application developed in VS2010 which uses some of the win32 component. I ported the code in VS2013 and I built the code after removing all compilation error in Release Mode. Now when I am trying to run the exe in Computer where VS2013 is installed it is working fine where as it is giving an error of mfc120.dll is missing where only VS2010 is installed. I don't think after building the code in Release mode I should get an error of missing dll. I have not tried to run the exe where no Visual Studio is installed.
If you are using the DLL version of the MFC you also need to install the corresponding VS-2013 runtime DLLs vsredist_x86
Or you switch to a complete static build.
I have found out the solution for this problem. Basically the win32 code I was building was using the Configuration Properties->General-> 'Use MFC in a Shared DLL' which I changed to 'Use MFC in a Shared DLL'. All working fine there after

FSharp.Core for Windows Phone 7.1 and F# 3.0

The F# 2.0 distribution had a version of FSharp.Core compiled for WindowsPhone 7.1/Silverlight 4, but F# 3.0 doesn't, and the portable version only supports Silverlight 5 or Windows Phone 8. Has anyone been able to compile a version of FSharp.Core for F# 3.0 targeting Silverlight 4 or Windows Phone 7.1 from source? What are the defines required?
Edit:
On the fsharp compiler github repo, there's a target named portable-net4+sl4+wp71+win8, but in reality that's portable class library Profile47, which supposedly only support .NET 4.5, Silverlight 5.0 and Windows Store apps. It's the same as what's installed with VS2012. If you try to use it with a WP 7.1 project, it will fail at runtime complaining about missing IStructuralEquatable. It should really be named portable-net45+sl5+win8. There's a wp7 target also in the proj files, but it's currently not compiling
I managed to compile it, but since I don't normally use F#, I don't know how to test it. Have you followed the instructions for compiling? Just type the following commands in the VS Developer Prompt
cd src
msbuild fsharp-proto-build.proj
msbuild fsharp-library-build.proj
msbuild fsharp-compiler-build.proj
msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8
Note that I did it with Visual Studio 2012 Professional. If you want, I can send you compiled dll and you can try it.
Got both the wp7 target and Portable88 target compiling from F# source after a couple of changes https://github.com/ovatsus/fsharp
Still need to thoroughly test at runtime, though

C++/CLI Missing MSVCR90.DLL

I have a c++/cli dll that I load at runtime and which works great in debug mode. If I try and load the dll in release mode it fails to load stating that one or more dependencies are missing. If I run depends against it I am missing MSVCR90.DLL from MSVCM90.DLL. If I check the debug version of the dll it also has the missing dependency, but against the debug (D) version.
I have made sure debug/release embed the manifest file. I read something about there being issues with the app loading the dll being build as Any CPU and the dll being built as x86, but I don't see how to set them both to x86.
I am using VS2010.
Anyway, I've been messing around for a while now and have no idea what is wrong. I'm sure someone out there knows what is going on. Let me know if I need to include additional info.
alt text http://www.freeimagehosting.net/uploads/fb31c0e256.png
UPDATE:
This ended up being the resolution to my problem: http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/07794679-159b-4363-ae94-a68fe258d827
MSVCR90 is the runtime for Visual Studio 2008. If you are running your application on your development PC, then you should have the debug and release runtimes installed (as part of Visual Studio) but it is possible something has gone awry with your install, or that VS2010 doesn't actually include the older runtimes. If you're trying to run the Release on a different PC, then it just needs the runtime installed.
Either way, you may be able to fix it by installing the Visual Studio 2008 redistributable - but make sure you get the right download for your PC (x86 or x64).
In previous versions of VS, you needed the runtime for the version you were compiling with, so if VS2010 follows this precedent you'd need MSVCR100, not MSVCR90 - which suggests that you may not have recompiled the dll with VS2010 - doing so may be another approach to get it running on your PC (using the redist that is in your VS2010 install) but beware that you will still need other users to install the appropriate (VS2010) redistributable on their PC.
As for "Any CPU" versus "x86", this is a problem only on a 64-bit computer. On those systems a 64-bit application can't link dynamically to 32-bit dlls. If you compile your application as "Any CPU" it will be JIT compiled to be 64-bit on an 64-bit OS, so will crash if it tries to call any 32-bit dlls directly. THe solution is to build the application targeting "x86" as that forces the JIT compiler to generate 32-bit code (even on a 64-bit machine) and thus ensures compatibility with the dll you wish to call. If the DLL is a managed assembly, then you can use Any CPU on both the app an dll as they will both be JITted to the same format.
It happened to me something similar running a website in Vistual Studio 2012, after migrating from Visual Studio 2010. The error message was saying that MSVCR90.DLL was missing. The solution was:
1) Delete the folder _bindeployable located at the project path.
2) Rebuild.
I hope it helps.

Resources