472,958 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 472,958 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 1908

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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.