Replacing the compiler in Visual C++ 6 - visual-c++

Can I use Microsoft Development Studio (a.k.a. Visual C++ 6), but replacing its awful compiler with that of Visual C++ 2005 or, even better, GCC? If so, how?

If you download and install the latest windows SDKs, they should include the latest versions of cl.exe, link.exe, midl.exe, etc. You just need to point the executables path (tools->options->etc) at the new SDK dir and remove the build-in VS paths.

Related

Can I use Visual Studio for developing Linux C or C++?

I have to develop something in Linux(CentOS 6.5) Environment using C or C++ language with many of libraries for linux.
As you know, CentOS is not GUI. So, I want to use Microsoft Visual Studio for my work. It's OK even if use just VS as the Editor.
I mean that I like the features of IDE visual studio(intellisense, debugger, and so on).
I have Visual Studio 2008, 2010, 2013 Professional.
yes you can, in fact, if you have setup a VM machine, you can even directly include the C++ include library of Linux (However, this only works for write code, not work with compiling). You could also setup CYGWIN or MINGW for referencing the header of Linux platform.
In fact, for myself, I switched to QtCreator as a cross platform C++ IDE, it also has auto-complete and debug features.

Makefiles for Microsoft Visual C++

I have few queries regarding makefiles for MSVC. I want to create makefiles which will compile my project on Visual C++ compiler. One thing I found in the web named "nmake" which is said to be the makefiles for MSVC(correct me if I am wrong).
So, I introduced myself with nmake and compiled a single source file successfully with this. But the issue is, I need to run this nmake file using command prompt of visual studio. I haven't found a way to use the file in normal command prompt. Is it really possible?
Suppose, I don't have a visual studio installed. I have only the visual C++ compiler. Then how I will be able to compile my projects using nmake?
One Additional question, if I have only visual C++ compiler installed(like the old compilers eg. microsoft visual C++ 2005), then is it certain that I will get nmake command on this?
Thanks in advance.
Solved! Answering myself, so that if anyone intend to compile makefiles using nmake for Visual C++ compiler.
Yes, it is compiles in older version of visual C++ also. I have tested and it works fine. But it may cause problems when some properties are use of latest visual C++ compiler. Because you will not find those properties in older version of C++ compiler. Otherwise it is quite OK.

Corrupt C runtime library?

I'm using Visual Studio Professional 2012 (with Update 2) and since I have a project that needs to be built with the VC++ 2010 toolset I also installed Visual C++ 2010 Express (with SP1).
I use the newer 2012 IDE also for the older projects. So for these projects I set the Platform Toolset to v100. And when I also set the runtime library to /MT or /MTd I get the following error:
error LNK1127: library is corrupt
for libcpmt.lib or libcpmtd.lib, depending on the configuration.
What could be wrong here?
Installation history:
VS2012 Professional
Windows 7 SDK
Uninstalled VS2012 and Windows SDK
VC++ 2010 Express
VS2012 Professional
If I understood correctly, you installed VS2010 after installing VS2012? If not, please edit your question to make it clear.
This sequence of installations is not recommended by Microsoft, and there are plenty of caveats and ReadMe's to navigate in order to find out what's happened.
I suggest that the best thing to do is to reinstall VS2012 (or do a repair install), then see what - if anything - is still broken.

Merge module is missed - Microsoft_VC100_CRT_x86.msm

I'm creating distrib using Windows Installer XML (WiX) toolset. And I want to add the Visual C++ Redistributable to the package. Here
http://wix.sourceforge.net/manual-wix3/install_vcredist.htm
are words about merge modules necessary to make this. But there are no Microsoft_VC100_CRT_x86.msm in my
c:\Program Files (x86)\Common Files\Merge Modules\
:(((
I'm using MS VC++ 2010 Express. I have tried to Repair the installation. No relusts.
Any ideas?
Will be grateful for any help :)
Express versions do not include the merge modules.
From the product description:
Note: Visual C++ Express provides a subset of the functionality that is available in other Visual C++ editions. Therefore, some components, libraries, or features available in these editions are not available in this version of the product, even though they might be discussed in the documentation. For these features, you would have to upgrade to another version of Visual C++. For more information about these editions, see Visual C++ Editions.

How can I programmatically determine if the Visual C++ Runtime 8.0 is installed?

I have an InstallShield installation that uses custom actions that depends on the Visual C++ Runtime 8.0 sp1. In the past, I was able to install the runtime using the merge module provided by Microsoft with Visual Studio. Based on the way the Visual C++ Runtime 8.0 sp1 side-by-side installation works on Vista, the runtime cannot be used until the commit sequence of the installation.
This means that I must either move the executing of my custom actions to the commit sequence (undesirable, since the installation can't be rolled back during this sequence if something goes wrong) or install the Visual C++ Runtime before my installation using an InstallShield prerequisite.
I would prefer to install the Visual C++ Runtime as a prerequisite, but a prerequisite for this is not provided by InstallShield, so I had to write my own. I was able to figure out how to configure the prerequisite to install the runtime, but I don't know how to determine if it is already installed. Is there a registry key or file version I can check to determine this?
I found blog posts that describes detect the Visual C++ Runtime 8.0 and Visual C++ Runtime 8.1. Basically, you can use the MSI Automation Interface to look for the product codes for each of the runtimes.
You could also look for the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode] where [ProductCode] is the product code for the runtime you're trying to detect (eg. {7299052b-02a4-4627-81f2-1818da5d550d} is the product code for the x86 version of the 8.0 sp1 runtime).
These methods only work to detect if the runtime redistributable package is installed; it is possible that the runtime is installed even if these methods don't indicate so (eg. if it was installed as a merge module instead of using the redistributable), but it shouldn't hurt anything to install the redistributable package in this case.

Resources