Thread: Visual Studio - "Single-EXE" output

  1. #1
    Beginning game programmer Petike's Avatar
    Join Date
    Jan 2008
    Posts
    64

    Question Visual Studio - "Single-EXE" output

    Hi all,
    how can I make in Visual Studio the application which will be stored only in one exe file?
    I don't want the application to require some other resources (some dlls, or other stuff) when it is launched.

    Because I have made a simple program and I wanted to copy that exe file to another computer but there it couldn't be launched because of some required (dll) files which were missing there.

    In other words, I want to make a program fully compatible (e.g. among Windowses).


    Thanks.
    Petike

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Petike View Post
    Hi all,
    how can I make in Visual Studio the application which will be stored only in one exe file?
    I don't want the application to require some other resources (some dlls, or other stuff) when it is launched.

    Because I have made a simple program and I wanted to copy that exe file to another computer but there it couldn't be launched because of some required (dll) files which were missing there.

    In other words, I want to make a program fully compatible (e.g. among Windowses).


    Thanks.
    Which DLLs was it complaining about? If you are using any nonstandard libraries and don't want DLLs, you'll need to link statically.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    If the target computer lacks the Visual Studio runtime, all you have to do is install it once.
    The runtime is available from Microsoft's homepage. It is required to be installed on the target computer for any Visual Studio app to run.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Beginning game programmer Petike's Avatar
    Join Date
    Jan 2008
    Posts
    64

    Question In other words...

    Quote Originally Posted by Elysia View Post
    It is required to be installed on the target computer for any Visual Studio app to run.
    I would say it in other words.
    Almost always I have downloaded whatever game, application or other software, I have just installed it and then launch it, and it was running ok. And I want to do the same. The user will just download my application and run it without installing some other software which is not required.

    I think that in Visual Studio I have to set somewhere that it will give all the files in one "exe" file. If someone could tell me where to set it (if it is possible).

    P.S.: By the way, I am using in that application "OpenGL", maybe there is some other steps to set it up.


    Thanks.
    Petike

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    The typical way to do this is an installer.
    It can detect if the runtime is not installed, and if not, install it transparently.
    Believe it or not, most programs actually bundle the runtime with them and install it on the machine when installing the software.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. visual studio 6 and visual studio.net difference
    By gemini_shooter in forum Tech Board
    Replies: 5
    Last Post: 02-04-2006, 01:32 AM
  3. Base converter libary
    By cdonlan in forum C++ Programming
    Replies: 22
    Last Post: 05-15-2005, 01:11 AM
  4. Why?
    By gprime in forum C++ Programming
    Replies: 5
    Last Post: 06-13-2004, 04:44 PM
  5. Using 'if' with char arrays or string objects
    By c++_n00b in forum C++ Programming
    Replies: 36
    Last Post: 06-06-2002, 09:04 PM