Hi,

We are new to Visual Studio 2008, barely a month into a C++ course, and are currently working on a few personal projects.

We have successfully created a console application with Visual Studio but are not sure on how to get the program to run outside of Visual Studio. Looking through the provided textbook(s), we can not find a clear solution.

Is there any way to build the program, so that it is an .exe file that can be used independently?

Any advice would be much appreciated!

K & R

>Is there any way to build the program, so that it is an .exe file that can be used independently?
Yes, sure there is!

I assume you can run the program from within Visual Studio?
In that case you just browse to the folder where your project is saved in, there will be a folder called "Release" or something, and in that folder you'll probably find your executable file.
If your program is fully finished, I would also like to advise you to compile your code in "Release" mode, instead of the default "Debug" mode.

On MSDN you can also find a video to learn become familiar with the IDE, check it out here.

>Is there any way to build the program, so that it is an .exe file that can be used independently?
Yes, sure there is!

I assume you can run the program from within Visual Studio?
In that case you just browse to the folder where your project is saved in, there will be a folder called "Release" or something, and in that folder you'll probably find your executable file.
If your program is fully finished, I would also like to advise you to compile your code in "Release" mode, instead of the default "Debug" mode.

On MSDN you can also find a video to learn become familiar with the IDE, check it out here.

Thank you -- we found the file!

Just needs a few tweaks so we'll take your advice on the compiling method!

K & R

The only problem with Visual 2008's compiled files is that you cannot run it on other machines without the .NET framework. I recommend finding a way to get it to work without the .NET framework or get DevC++.

The only problem with Visual 2008's compiled files is that you cannot run it on other machines without the .NET framework. I recommend finding a way to get it to work without the .NET framework or get DevC++.

If I'm not wrong, you can also compile your source code as a native Windows application, which doesn't need .NET to run.
Though I'm not so sure about this.

Edit::
http://msdn.microsoft.com/en-us/library/60k1461a.aspx
http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express

I remember looking all over for something like that but i don't think it exists... Not to worry! All windows operating systems from VISTA and above have the .NET framework already installed on it... Of course XP and lower don't -.-

I also know of a way (only with MFC though) to link the libraries in a different way so that you can run it on different systems... static linking i think? But MFC is old and never used/updated anymore.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.