0

Possible Duplicate:
How do I make a fully statically linked .exe with Visual Studio Express 2005?

I've noticed that if you try to run a program compiled with VSC++ you need to have the redristibutable insalled. Is there any way to make your exe only need the library you used?

Community
  • 1
  • 1
Romeo
  • 376
  • 1
  • 3
  • 14

1 Answers1

1

You cannot run a program without parts of the runtime library which is inside the redistributable. However, you can statically link the redist into the exe. See here: C++ executable - MSVCR100.dll not found error

Community
  • 1
  • 1
Arne Mertz
  • 24,171
  • 3
  • 51
  • 90
  • Not true: http://stackoverflow.com/questions/37398/how-do-i-make-a-fully-statically-linked-exe-with-visual-studio-express-2005 – Eric J. Jan 16 '13 at 18:54
  • Does the redistributable only reffer to MSVCR100.dll? If so, i think i can give this file along with my .exe. Or does the copyright stop me from doing this? – Romeo Jan 16 '13 at 19:00
  • That's what the redistributable is for - you can redistribute it to your customers. @EricJ.: care to elaborate what's the difference between what I said and the answer to the question you linked? – Arne Mertz Jan 16 '13 at 19:06
  • You cannot "link the redist", a DLL is not a linkable item. – Hans Passant Jan 16 '13 at 19:21