Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. visual studio run time problem

visual studio run time problem

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiohelpannouncement
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    trioum
    wrote on last edited by
    #1

    I build application using visual studio 2005 in release mode without MFC. but I need to install vc2005 run time to run the application . is there any settings in visual studio so that without installing vc2005 run time I can run my application .

    Trioum

    C A 2 Replies Last reply
    0
    • T trioum

      I build application using visual studio 2005 in release mode without MFC. but I need to install vc2005 run time to run the application . is there any settings in visual studio so that without installing vc2005 run time I can run my application .

      Trioum

      C Offline
      C Offline
      Chuck OToole
      wrote on last edited by
      #2

      You can link your application with static copies of the library rather than the shared DLL copies. There is a setting for the linker to do this. Remember that linking statically increases the size of your EXE / DLL because all the required C Runtime Library and MFC / ATL libraries are included in your application. Of course, this is the tradeoff you make when you decide to not include the VS2005 redistributables in your kit / installation package.

      T 1 Reply Last reply
      0
      • C Chuck OToole

        You can link your application with static copies of the library rather than the shared DLL copies. There is a setting for the linker to do this. Remember that linking statically increases the size of your EXE / DLL because all the required C Runtime Library and MFC / ATL libraries are included in your application. Of course, this is the tradeoff you make when you decide to not include the VS2005 redistributables in your kit / installation package.

        T Offline
        T Offline
        trioum
        wrote on last edited by
        #3

        Where I found this setting

        Trioum

        _ 1 Reply Last reply
        0
        • T trioum

          Where I found this setting

          Trioum

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library. Set this to /MT and /MTd for Release mode and Debug mode respectively.

          «_Superman_»  _I love work. It gives me something to do between weekends.

          _Microsoft MVP (Visual C++)

          Polymorphism in C

          T 1 Reply Last reply
          0
          • T trioum

            I build application using visual studio 2005 in release mode without MFC. but I need to install vc2005 run time to run the application . is there any settings in visual studio so that without installing vc2005 run time I can run my application .

            Trioum

            A Offline
            A Offline
            Albert Holguin
            wrote on last edited by
            #5

            You don't HAVE to install visual studio, there's probably some dependencies that you need to distribute along with your application so that it'll be complete. Use a tool like Dependency Walker[^] to figure out what libraries you may be missing. You can then either include those libraries in your distribution OR build them into your executable statically (depending on what libraries you may be missing).

            1 Reply Last reply
            0
            • _ _Superman_

              Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library. Set this to /MT and /MTd for Release mode and Debug mode respectively.

              «_Superman_»  _I love work. It gives me something to do between weekends.

              _Microsoft MVP (Visual C++)

              Polymorphism in C

              T Offline
              T Offline
              trioum
              wrote on last edited by
              #6

              It is already set , if I installed vcredist_x86.exe then exe run , if uninstall then exe do not run . i am using Use Standard Windows Libraries in release mode

              Trioum

              C 1 Reply Last reply
              0
              • T trioum

                It is already set , if I installed vcredist_x86.exe then exe run , if uninstall then exe do not run . i am using Use Standard Windows Libraries in release mode

                Trioum

                C Offline
                C Offline
                Chuck OToole
                wrote on last edited by
                #7

                Besides the setting for the C RTL (/MT etc...) you also need to check the Configuration Properties -> General for the "Use of MFC" and "Use of ATL". Both of those have a selection for "in a static library". The default to "use standard windows libraries" which means "shared DLL". I use VS2008 but I think they are in the same place in VS2005

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups