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. Native c++ using VC++ 8.0

Native c++ using VC++ 8.0

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharpdotnethelpquestion
13 Posts 5 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.
  • H hogan john

    Can I write native C++ code which will run without the help of .NET Framework in VC++ 8.0? I tried New Project -> VC++ -> Win32 -> Win32 Project. But it is not working without the help of Framework. Regards, Hogan

    N Offline
    N Offline
    Naveen
    wrote on last edited by
    #2

    hogan.john wrote:

    But it is not working without the help of Framework.

    How did you confirm that?

    nave [OpenedFileFinder]

    H 1 Reply Last reply
    0
    • N Naveen

      hogan.john wrote:

      But it is not working without the help of Framework.

      How did you confirm that?

      nave [OpenedFileFinder]

      H Offline
      H Offline
      hogan john
      wrote on last edited by
      #3

      VC++ 8.0 and Framework 3.5 installed in my development machine. So I build it then copied the release folder into another machine that doesn’t have Framework. It showed the error message “The application is failed to start because the configuration is incorrect”. I assume this error because of the lack of framework. Please let me know is it possible to write native code in VC++ 8.0 which will run without the help of Framework.

      N 1 Reply Last reply
      0
      • H hogan john

        VC++ 8.0 and Framework 3.5 installed in my development machine. So I build it then copied the release folder into another machine that doesn’t have Framework. It showed the error message “The application is failed to start because the configuration is incorrect”. I assume this error because of the lack of framework. Please let me know is it possible to write native code in VC++ 8.0 which will run without the help of Framework.

        N Offline
        N Offline
        Naveen
        wrote on last edited by
        #4

        it is not because of the .net Framework. But the vc++ runtime dlls may not be present in the target machine. you can download the run time from following site and install it on the other machine. Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) [^]

        nave [OpenedFileFinder]

        H 1 Reply Last reply
        0
        • N Naveen

          it is not because of the .net Framework. But the vc++ runtime dlls may not be present in the target machine. you can download the run time from following site and install it on the other machine. Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) [^]

          nave [OpenedFileFinder]

          H Offline
          H Offline
          hogan john
          wrote on last edited by
          #5

          Thanks for your great help. So we need at least this service pack on the target machine. This is annoying me. Every one said that VC++ 8.0 is the best modern compiler. But the programs developed in this required a helper software. Ok once again thanks for your kind response :-D

          C S 2 Replies Last reply
          0
          • H hogan john

            Thanks for your great help. So we need at least this service pack on the target machine. This is annoying me. Every one said that VC++ 8.0 is the best modern compiler. But the programs developed in this required a helper software. Ok once again thanks for your kind response :-D

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #6

            You can also link statically to the C-runtime library. I guess in that case you won't need to install the redist package. Not sure because I never worked with VC2008. Of course in that case your exe will be larger.

            Cédric Moonen Software developer
            Charting control [v1.4]

            H 1 Reply Last reply
            0
            • H hogan john

              Thanks for your great help. So we need at least this service pack on the target machine. This is annoying me. Every one said that VC++ 8.0 is the best modern compiler. But the programs developed in this required a helper software. Ok once again thanks for your kind response :-D

              S Offline
              S Offline
              Saurabh Garg
              wrote on last edited by
              #7

              No you don't necessarily have to install this, you can also copy DLL's along with the executable. The DLL's needed to be redistributed are in the folder "Microsoft Visual Studio 8.0\VC\redist\x86". I think VC++ Express Edition do not come with "redist" folder, however, there is a solution discusses here[^]. There is an article here at codeproject discussing this same issuse (link[^]). Look at "Install a private assembly" section. Lastly you can link with CRT DLL's statically so that there are no dependencies. Also this is not specific to VC++, such dependencies will always be there no matter what compiler you will use. It might be easier to do this for other compilers but they will be there. There will always be libraries you link with and have to install them on user machine. -Saurabh

              H 1 Reply Last reply
              0
              • C Cedric Moonen

                You can also link statically to the C-runtime library. I guess in that case you won't need to install the redist package. Not sure because I never worked with VC2008. Of course in that case your exe will be larger.

                Cédric Moonen Software developer
                Charting control [v1.4]

                H Offline
                H Offline
                hogan john
                wrote on last edited by
                #8

                I am sorry if my curiosity irate you. If there is no problem can tell me which tool you are using to develop C++ applications? :) Regards, Hogan

                C 1 Reply Last reply
                0
                • S Saurabh Garg

                  No you don't necessarily have to install this, you can also copy DLL's along with the executable. The DLL's needed to be redistributed are in the folder "Microsoft Visual Studio 8.0\VC\redist\x86". I think VC++ Express Edition do not come with "redist" folder, however, there is a solution discusses here[^]. There is an article here at codeproject discussing this same issuse (link[^]). Look at "Install a private assembly" section. Lastly you can link with CRT DLL's statically so that there are no dependencies. Also this is not specific to VC++, such dependencies will always be there no matter what compiler you will use. It might be easier to do this for other compilers but they will be there. There will always be libraries you link with and have to install them on user machine. -Saurabh

                  H Offline
                  H Offline
                  hogan john
                  wrote on last edited by
                  #9

                  Thanks for that link. It really help me

                  S 1 Reply Last reply
                  0
                  • H hogan john

                    Thanks for that link. It really help me

                    S Offline
                    S Offline
                    Saurabh Garg
                    wrote on last edited by
                    #10

                    You are welcome. -Saurabh

                    M 1 Reply Last reply
                    0
                    • H hogan john

                      I am sorry if my curiosity irate you. If there is no problem can tell me which tool you are using to develop C++ applications? :) Regards, Hogan

                      C Offline
                      C Offline
                      Cedric Moonen
                      wrote on last edited by
                      #11

                      I'm using VC2005 :)

                      Cédric Moonen Software developer
                      Charting control [v1.4]

                      1 Reply Last reply
                      0
                      • S Saurabh Garg

                        You are welcome. -Saurabh

                        M Offline
                        M Offline
                        malaugh
                        wrote on last edited by
                        #12

                        I had the saem problem as you. I could not get my programs tio run on a machine with just the OS. Now I 1) Change the Project defaults in the General Section to "Use MFC in a static library" 2) Uncheck "Inherit from Parent or project defaults" in the linker Additional Library Directories section (gets rid of a warning). All my programs work on a machone with a "virgin" OS after these changes.

                        S 1 Reply Last reply
                        0
                        • M malaugh

                          I had the saem problem as you. I could not get my programs tio run on a machine with just the OS. Now I 1) Change the Project defaults in the General Section to "Use MFC in a static library" 2) Uncheck "Inherit from Parent or project defaults" in the linker Additional Library Directories section (gets rid of a warning). All my programs work on a machone with a "virgin" OS after these changes.

                          S Offline
                          S Offline
                          Saurabh Garg
                          wrote on last edited by
                          #13

                          Statically linking is okay for projects which do not depend on other 3rd party components using MFC. If you link MFC statically in your project and use a component with dynamically linked MFC then there will be problems. -Saurabh

                          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