Jump to content

  • Log In with Google      Sign In   
  • Create Account


Is there's a way to statically link vs 2010 runtime dlls?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Vortez   Crossbones+   -  Reputation: 2689

Like
0Likes
Like

Posted 05 March 2013 - 03:42 PM

I was wondering if there was a way do statically link those 2 dlls you need for a vs 2010 application to work on someone's else machine if they don't have the runtime installed. That would make my life a bit easier, thx.


Edited by jbadams, 04 April 2013 - 05:52 AM.
Restored post contents from history.


Sponsor:

#2 Brother Bob   Moderators   -  Reputation: 7905

Like
0Likes
Like

Posted 05 March 2013 - 04:15 PM

In the project properties, go to Configuration Properties, C++ and Code Generation, and change the Runtime Library option to a non-DLL runtime.



#3 Vortez   Crossbones+   -  Reputation: 2689

Like
0Likes
Like

Posted 05 March 2013 - 05:24 PM

Thx ill give it a try


Edited by jbadams, 04 April 2013 - 05:53 AM.
Restored post contents from history.


#4 iMalc   Crossbones+   -  Reputation: 2292

Like
0Likes
Like

Posted 06 March 2013 - 01:15 AM

You may also need to set "Configuration Properties -> General -> Use of MFC" to "Use MFC in a Static Library".
Note that this doesn't only apply when you are actually using MFC yourself. It quite often applies when something you're using uses MFC itself internally I believe.
Sometimes you even need to do the same for the ATL setting right below that, IIRC.

If in doubt, Use the program "Depends.exe" before and after making these changes, to see what DLLs your program actually requires, and prove that you've removed the unwanted dependencies.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms

#5 Vortez   Crossbones+   -  Reputation: 2689

Like
0Likes
Like

Posted 06 March 2013 - 02:42 AM

Thx for the tip but, I will never,never,never,never,never,never,never,never,never,never use mfc

 

NEVER !!


Edited by jbadams, 04 April 2013 - 05:53 AM.
Restored post contents from history.


#6 mhagain   Crossbones+   -  Reputation: 7610

Like
0Likes
Like

Posted 06 March 2013 - 01:15 PM

"Never" is a very long time.

 

Despite that, the point iMalc was making was that you may not be using MFC, but some other library that you're linking to may be using it behind your back, although I believe that the static vs dynamic usage of MFC would in that case depend on the project settings used for building that other library, not for your program.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#7 iMalc   Crossbones+   -  Reputation: 2292

Like
0Likes
Like

Posted 07 March 2013 - 12:24 PM

I once found it out in desparation, and have confirmed it several times since, that setting it to "Use MFC in a Static Library", removes some dependencies on other DLLs, and no I never use MFC either. If you still have unwanted dependencies, it cant hurt to try it out.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS