user2877050
user2877050

Reputation: 3

how to avoid linking msvcr100.dll?

I'm using VC++ Express, my application needs msvcr100.dll. The user should have this file in his system, is there any way that my application could avoid the use of these files ?

Upvotes: 0

Views: 436

Answers (2)

Roman Ryltsov
Roman Ryltsov

Reputation: 69687

In project settings, change Runtime Linrary for Release builds to Multi-threaded /MT (as opposed to Multi-threaded DLL /MD). This switches to static runtime library and eliminates the dependency in question.

enter image description here

See also:

Upvotes: 1

deviantfan
deviantfan

Reputation: 11434

C and C++ standards don´t only define the languages, but some (many) functions and classes, which a system supporting C/C++ should have (at least). A clean Windows installation has only a subset of the necessary things, while this DLL file has everything (but this DLL is not automatically installed).

Three possibilities:
a) Force every user to install the MSVC redistributable package (according to your question, you don´t want that)

b) Distribute the file yourself together with your program. Problematic because version issues etc., and possibly legal problems in some jurisdictions.

c) Enable "static" linking in the project setting. This will put everything in your own EXE file; it will use more memory but isn´t dependent on the external file anymore. Where to find this in VS: How do I make a fully statically linked .exe with Visual Studio Express 2005?

Upvotes: 0

Related Questions