473,416 Members | 1,562 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,416 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 2055

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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.