473,287 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,287 developers and data experts.

Static Linking to stop Visual C++ RTL and MSVCR80.dll problems.

SwissProgrammer
220 128KB
This works:
Compile C++ Code with STATIC LINKING without a dependency on any exterior MSVCR80.dll (or other versions of MSVCxxx.dll's).
Some history:
I was compiling a C++11 program and I put too many items into a vector array and I got an error message: Microsoft Visual C++ Runtime Library Error. I do not have MS VC++ installed on my computer. I pushed another limit and was again reminded of Microsoft's aggressive backdoor insertion policy.
A tiny bit of response:
I have been researching this (Visual C++ RTL related) and found that for many programs to run on MS Windows that a MS VC++ RTL is commonly assumed to be a requirement. Not totally, but for many people, it seems to be an assumption.

I had found that years ago. But, I was reminded recently to remain aware.
Observation:
At any time, if you allow updates to your operating system from Microsoft (due to your stupidity or ignorance or not caring or etc.), then those dll's might be changed by Microsoft, or they might be changed by some others, whomever and to inject code into your program (via the dynamic dll).
For other programmers, this is what might has happened:
A C++ programmer, and I guess maybe a C programmer, programming on a Microsoft Windows operating system codes a program not using any Visual Studio IDE. No VS C++ IDE. But, they are advised to use dynamic linking to dll's and they did not consider the consequences sufficiently. That dynamic linking has had the potential of severe anti-security.
Some fixes if you do not want that aggressive anti-security back-door:
  1. If you have to use dll's dynamically, then: Try to only use any dlls which you did study the code for security concerns and then compile the program yourself outside of a MS VS IDE environment. Try to use hard-coded one-time-pad encryption for your program's communicating with that dll.
  2. Compile C++ Code with STATIC LINKING without a dependency on any exterior MSVCR80.dll (or other versions of MSVCxxx.dll's). It might make the size of your executable larger, but look at this option like adding a shield to your exe.

Microsoft already told you about this.

Microsoft told you about this many times. Over and over again. Microsoft told you that their security breaches (from Microsoft) are what you want. Microsoft told you that you like this and that this is what you have been asking for. This is nothing new. I am not revealing some dark secret. You have been told this for year after year (since about 2004) by Microsoft. It is up to YOU to think or suffer the consequences of others thinking for you. You know this.

Think. God gave you a brain. Use it.

Only use static linking.
or
Do not use dll's that you did not create and compile yourself.

Until MS changes it, see a related discussion here.
Feb 22 '21 #1
0 2026

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: daniel_shaw01 | last post by:
I want to link the C++ standard libraries statically for my application because I don't space for the .so files on my target platform. After quite a bit of searching, I found very little...
1
by: GMartin | last post by:
Is there any way you can stop Visual Studio .NET 2003, from regenerating the HTML every time you go into Design View? I'm mostly in the Code behind page, and just want to pop over to check a...
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
0
by: P.L. | last post by:
Dear experts, I tried to compose a French page with user controls. I realized that French words would not be displayed correctly if I directly use Latin characters, such as è. Instead, after I...
2
by: vasantha2712 | last post by:
I am trying to integrate Log4cpp in our project. I was able to successfully build the log4cpp using the command : ./configure --disable-static . I have included the log4cpp libraries path in...
2
by: ashesman | last post by:
OK, I have written an application in MS Visual C# using .net. Is it posibble to static link into one self contained .exe file? This would certainly make distribution of a small accessory file...
4
by: nishantb | last post by:
I had posted simillar question some time back. i want to link some libraries statically on NT. currently, product execute command simillar to following. link /STACK:0x20000 /libpath:D:/lib...
7
by: =?Utf-8?B?UmFtZW5kcmEgS290aGFya2Fy?= | last post by:
Hello, I want to know how to statically link GDIPlus.dll with VC++ application that should be able to run on W2k machine without the existence of GDIPlus.dll on the target machine. Currently,...
2
by: Mohsen A. Momeni | last post by:
Hi, Does it have any difference in security, whether to compile a function as a static lib and link it with a program or just add the function to the source? In other words, suppose we have two...
4
by: silverleaf | last post by:
I'm starting to learn how to use the Allegro library with C++ on my own. My compiler is MSVisual C++ 6.0. The book I am learning out of is "Game Programming All In One, Third Edition" by Jonathan...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.