Are Runtime libraries included in Visual Studio 2008 Pro by default? - visual-studio

Can anyone tell me how to check in visual studio if it has the following libraries included?
The first question I have is are any of these included in the VS by default by installing VS 2008.
These are the libraries:
VC++ Runtime libraries
VC++ Static MT CRT libraries
VC++ Dynamic CRT libraries
ATL MFC Shared Libraries unicode
Can you please suggest me what I need to do, if they are not included in the VC++? Can you provide me with their download links please?

This doesn't look like a linker error; it looks like a compiler error. So, yes, your colleague is right: it might have something to do with #include files, in particular with an #include file that your cpp source failed to #include.
Look for and the include the file atlcom.h and see what the compiler says then.

Microsoft Visual C++ 2008 Redistributable Package (x86)
Be sure to get all updates (windows update or e.g. InstallShield update components etc).
Notably, there has been an important update to ATL Server components which I think (IIRC) is in
Microsoft Visual Studio 2008 Service Pack 1 Update (KB974479)
Update and check this one too
Visual Studio 2008 Service Pack 1 ATL Security Update

Related

Needs to compile the missing `detour 3.0` lib in Visual Studio

I am going to compile old project(visual studio 2012 platform-v110xp) in visual studio 2013 or Visual Studio 2019.
It's using boost and Microsoft detour 3.0 libraries.
But the detour 3.0 has been deleted accidentally.
And now I can only find detour4.0.
But I get an error like this
How do I get the detour 3.0 lib?
C++ Static Libraries built with VS 2015, VS 2017, or VS 2019 are "binary compatible", but that's not true of any other versions of Visual C++. For example, a static library that links with VS 2012 won't necessarily work when linked with VS 2013 code. See Microsoft Docs.
I don't know exactly what toolsets are involved but that's the likely cause of the link issues. The main thing is to make sure all the static libraries and main executable is built by the same compiler version.
Note that DLLs and their export libraries typically use only "C-style" binding so they can be binary compatible with multiple generations of compilers.
VS 2019 includes the v141_xp platform toolset (i.e. the VS 2017 compiler using the Windows 7.1A SDK that is compatible with Windows XP / Windows Server 2003).

VC++ custom action for Wix

We are using CustomActions written in VC++ in our WIX msis. it is working fine in Windows7 machine. But when we tried to run the msi in Win 10 it is not working and failing because Microsoft Visual C++ 2010 Redistributable Package is not installed by default in Win 10 machine. So for making the MSI to work we should install Microsoft Visual C++ 2010 Redistributable Package. But the problem is that we can't install it along with the MSi because the custom actions are responsible for choosing the INSTALLDIR and this will happen before installing anything.So my question is
1.)Do we really need Visual C++ 2010 Redistributable for running VC++ custom actions.?
2.)How can i install it before choosing the INSTALLDIR?
Simply compile your DLL with static libraries. In this case your DLL has no additional dependencies.
In the project settings set General->Use of MFC to Use MFC in a static library.
Under C/C++ -> Code Generation choose the options Multithreaded or Multithreaded Debug /MT or /MTd.
You can use the Dependency Walker to check out if you need more DLLs that must be installed.
You should statically link CRT libraries into your custom actions dll instead.

How to configure Glib on Microsoft Visual Studio 2010?

i'm trying to port to Windows a C project wrote to work on Linux. It's a simple project that depends CUDA and Glib librarys.
I believe the best way is to compile with Microsoft Visual Studio 2010, but i don't have idea how to link Glib to this project. CUDA code is going well, but every call to Glib methods generate a "unresolved external symbol" error.
i just solved my problem using this guide to configure GTK on Visual Studio 2008:
http://www.etechplanet.com/blog/visual-studio-2008-configuration-for-gtk2b-gui-development.aspx
The only change i done was about the Tools/Options/VC++ Directories because this was deprecated on VS2010. I added the paths directly to the project properties.

"program can't start because msvcp100.dll is missing" for Every single code

This error is taking toll of my training schedule.
Everytime I create any C++ application in my VS2010, It runs fine on my machine but if I run it on different machine, It starts with this error.
Error goes if I copy msvcp100.dll in System Folder then it shouts for some other DLL. It requires some 5-6 different DLLs.
Most irritating part is even if I write a simple Console based Addition program, It gives this error.
(I should not but)I would have agree if I design some fancy forms and all... But for simple Addition program????
Am I missing out somethings in Settings? or VS2010 to blame??
Somewhat related question: this But this problem seems different
By default, MSVC projects are set to link against the dynamic run time library which generates a dependency on the visual C++ run time redistributable. As you have already found out, this dependency is not guaranteed so your install utility has to install the visual c++ run time first.
You can avoid this by changing your project settings. Load the project properties and go to: "Configuration Properties"/"C/C++"/"Code Generation"
In the item labelled "Runtime Library", select "Multi Threaded (/MT)"
for the release version"Multi Threaded Debug (/MTd)" for the debug version.
You have to be careful while doing this that all the other libraries that your application links are also compiled against the static run time.
You need to have Visual C++ Libraries installed if you want to run your app.
Using the compiler options to change the runtime library worked for me ("Configuration Properties"/"C/C++"/"Code Generation". In the item labelled "Runtime Library", select "Multi Threaded (/MT)" for the release version and "Multi Threaded Debug (/MTd)" for the debug version). I did have to do both the debug and the release to get the release to work. Don't know why (it is possible that I did not do it correct the first time).
Note: I was using VC2010 Express version on Windows 7 to compile. I tested on an old XP machine.
Another note: MS information at http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=vs.100).aspx
If you have installed a new copy of Windows on your computer or have reinstalled one then you will come across an error called "The program can’t start because MSVCP100.dll is missing from your computer. Try reinstalling the program to fix the problem." on your computer.
The basic reason behind this error is that the Visual C++ doesn’t get installed when you reinstall or install a fresh copy of Windows operating system. In order to check Visual C++ is installed on your PC or not, open Control Panel → All Programs and Features and then search for Visual C++ in the software list. If you don’t find the software installed there then you have to install it.
I would suggest, first of all, install the Visual C++ 2010 package and check if it has solved msvcp100.dll missing error or not. If the issue is not resolved by the Microsoft Visual C++ 2010 then install 2013 or 2015 versions of Microsoft Visual C++. Here is the list of download links of Microsoft Visual C++ for both x86 and x64 architectures:
Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
Visual C++ Redistributable Packages for Visual Studio 2013
Visual C++ Redistributable for Visual Studio 2015
→ The latest supported Visual C++ downloads
I hope, now you are able to fix “The program can’t start because MSVCP100.dll is missing error on your computer. To know more details, you can follow this guide.
Thanks

Why is it "Bad" to Build Drivers with Visual Studio?

Microsoft Visual Studio's linker has a /DRIVER flag specifically for building drivers:
Use the /DRIVER linker option to build a Windows NT kernel mode driver.
However, Microsoft says:
You must not build drivers by using the compiler or linker that Microsoft Visual Studio provides.
which begs the question:
Why should I not compile/link drivers with Visual Studio?
Is the output generated by the DDK/WDK tools different from that generated by Visual Studio?
If so, how is it different?
Edit:
Notice that I'm talking about using Visual Studio's compiler and linker, not libraries!
I use the WDK headers and libraries with VS's compilers and linkers, but Microsoft specifically says that I need to avoid this:
You must not build drivers by using the compiler or linker that Microsoft Visual Studio provides.
They didn't even mention headers and libraries, so of course that's not my question.
Why?
This article put me on the right track, I think. That's because the DDK tools use different runtime libraries than Visual Studio.
Visual Studio will link the driver with the runtime libraries it provides (or optionally, the latest version of the runtime installed on the system), but a driver should arguably be linked with the exact same runtime used to build the operating system itself.

Resources