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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Static Compilation in .net project/ Dependancy of EXE file over Visual Studio Installation

Static Compilation in .net project/ Dependancy of EXE file over Visual Studio Installation

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharpdotnetvisual-studiotutorial
2 Posts 2 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.
  • M Offline
    M Offline
    Madhu_Rani
    wrote on last edited by
    #1

    I developed an application by using Visual Studio 2005 (Visual C++/MFC based project). The developed exe works fine over the machine that already have installation of Visual Studio 2005. But it does not run over other machine. I even installed the .net2 frameowrk and service pack of .net2 framework as well but did not succdeed in running the application. I remember that in old days, there was an option of static compilation in Visual C++ (6 version) without .net framework. So how we can do the same in Visual Studio 2005 that is dependant over .net framework. In static compilation, the compiler/linker put all the dependant stuff in exe file. Please guide me how I can run the application over machines that does not have installation of Visual Studio 2005. THANKS.

    L 1 Reply Last reply
    0
    • M Madhu_Rani

      I developed an application by using Visual Studio 2005 (Visual C++/MFC based project). The developed exe works fine over the machine that already have installation of Visual Studio 2005. But it does not run over other machine. I even installed the .net2 frameowrk and service pack of .net2 framework as well but did not succdeed in running the application. I remember that in old days, there was an option of static compilation in Visual C++ (6 version) without .net framework. So how we can do the same in Visual Studio 2005 that is dependant over .net framework. In static compilation, the compiler/linker put all the dependant stuff in exe file. Please guide me how I can run the application over machines that does not have installation of Visual Studio 2005. THANKS.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Madhu_Rani wrote:

      Please guide me how I can run the application over machines that does not have installation of Visual Studio 2005.

      Dynamic linked Visual Studio 2005 C++ applications may require the C run-time and MFC libraries installed on the client machine. Microsoft Visual C++ 2005 Redistributable Package (x86)[^] Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)[^] Another option is to static link your project by choosing 'Use MFC in a Static Library' in the General section of your configuration properties. You will also need to choose '/MT' runtime library in the Code Generation section. Best Wishes, -David Delaune

      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