Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Visual Studio C++ Express

27 Jan 2012   #1
JimLewandowski

 
 
Visual Studio C++ Express

What an unbelievably cryptic piece of software.

The things I want to are obvious:

build a console application and not TEST it but just RUN it. You know WITH parameters from the command line. I've googled and others have asked how to do this. Evidently it's difficult to do.

For example, if I navigate to where the .exe has been stored, double-clicking yields a DOS message that it is NOT an executable.

Anyone want to tutor a newbie on doing basic things with VC++.

Compile with NO debug.
Compile WITH debug.
Execute console application from some command line somewhere.

Call me crazy, but if I wrote software for developing apps and CONSOLE was selected, I'd probably want to give the user a command window to test or run his program. I mean console applications usually have parameters to be entered, don't they?


My System SpecsSystem Spec
.

28 Jan 2012   #2
MilesAhead

Windows 7 32 bit
 
 

My System SpecsSystem Spec
28 Jan 2012   #3
Azo

Windows 7 Home Premium 64Bit
 
 

I think there is a solution, but I am not sure if it would work. Most probably you need to clean build your project. Go to build > clean solution, Then try recompiling and running it. Do let me know what happens.
My System SpecsSystem Spec
.


28 Jan 2012   #4
MilesAhead

Windows 7 32 bit
 
 

Writing and Compiling C Program using Microsoft Visual C++ 2010 Express Edition TechnoZeal

The alternative I use, once I build the app the first time, I open a prompt to that folder and type in the program name with arguments and leave the prompt open. To run again I just switch to the prompt and hit the up arrow. No more typing.
My System SpecsSystem Spec
28 Jan 2012   #5
logicearth

Windows 8.1 Pro (x64)
 
 

Okay...this cannot be that hard. Where the executable for your program is located, hold shift then right click on the folder that contains your executable. Select "Open command window here", type the name of your executable with what ever options and enter.

Almost all console applications require you to open the command line for you to use them, double click on one just runs it with no commands then when it is done the console window closes. It has always worked like that.
My System SpecsSystem Spec
28 Jan 2012   #6
JimLewandowski

 
 

Quote   Quote: Originally Posted by logicearth View Post
Okay...this cannot be that hard. Where the executable for your program is located, hold shift then right click on the folder that contains your executable. Select "Open command window here", type the name of your executable with what ever options and enter.

Almost all console applications require you to open the command line for you to use them, double click on one just runs it with no commands then when it is done the console window closes. It has always worked like that.
Jeebus am I stupid. I didn't enclose it in quotes. Obviously the parsing then stops at \visual. IOW, it was easier to cut paste then navigate all the way to the destination directory.

C:\Users\Jim\documents\visual studio 2010\Projects\test\Release\test.exe

USER ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I'd still like to know how to compile something so it doesn't have any debug stuff embedded in it.
My System SpecsSystem Spec
28 Jan 2012   #7
JimLewandowski

 
 

MilesAhead, thanks for the great forum reference.
My System SpecsSystem Spec
28 Jan 2012   #8
MilesAhead

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by JimLewandowski View Post
MilesAhead, thanks for the great forum reference.
It's a good source from basic to very advanced questions. Only thing is if anything can be done with a container somebody will tell you "use STL" if you're programming in C++, like you never heard of it or something. But there's a lot of info there.
My System SpecsSystem Spec
28 Jan 2012   #9
MilesAhead

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by JimLewandowski View Post
Quote   Quote: Originally Posted by logicearth View Post
Okay...this cannot be that hard. Where the executable for your program is located, hold shift then right click on the folder that contains your executable. Select "Open command window here", type the name of your executable with what ever options and enter.

Almost all console applications require you to open the command line for you to use them, double click on one just runs it with no commands then when it is done the console window closes. It has always worked like that.
Jeebus am I stupid. I didn't enclose it in quotes. Obviously the parsing then stops at \visual. IOW, it was easier to cut paste then navigate all the way to the destination directory.

C:\Users\Jim\documents\visual studio 2010\Projects\test\Release\test.exe

USER ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I'd still like to know how to compile something so it doesn't have any debug stuff embedded in it.
I forget where but somewhere along the road in Win9x they decided it would be cool to allow spaces in folder and file names. If a path or param has a space on the command line you have to wrap in double quotes. This:

c:\program file\myprog.exe

will generate "c:\program is not a valid command" blah blah

you have to do

"c:\program files\myprog.exe" with the double quotes.

That's one reason I suggest changing the default directory for the command prompt to the folder in question. Then you can just type:
myprog param1 param2 and hit Enter

if a param is really 2 words or path with a space you still need the double quotes
myprog "param one" "param two"
My System SpecsSystem Spec
01 Feb 2012   #10
JimLewandowski

 
 

The Codeguru website will NOT send me a confirmation email. I've emailed the webmaster and zero reply.

Anyone know anyone who IS a registered member of Codeguru who can help me out?
My System SpecsSystem Spec
Reply

 Visual Studio C++ Express




Thread Tools





Similar help and support threads
Thread Forum
Visual Studio Express won't install if VS 2012 Professional installed
I have VS 2012 Professional installed and running. I tried to install VS Express 2013 for Windows. The installer runs and claims success but the program apparently is not there. Ran installer again and chose repair. It says successful. (Both times the message is "Restart" whereas Professional...
Software
Cannot uninstall MS Visual Studio 2013 Express
When running the uninstall, it says an element has not been found and stops. What should I do?
Software
Where to download Visual Studio 2008 Express CD (Offline) ?
Hello SF members, Today I want to find Visual Studio 2008 (offline). I can't find it, on Microsoft site I can find only VS2012 and 2012, but I need 2008 for my work. Where to download that CD or ISO ? Trinty :)
Software
Need Help fixing Visual Studio 2010 Express issue
So as of yesterday Visual Studio 2010 Express Edition doesn't work. I downloaded the DirectX June 2010 SDK hoping I could learn a little DirectX and port my game from XNA to DirectX. But after I installed Direct X and Visual Studio C++ 2010 Express and the Visual Studio 2010 Service Pack 1 Update...
Software
Visual Express and Ultimate on x64
Can I install Visual C++ 2010 Express and Visual Studio 2010 Ultimate on the same operating system? Will they conflict with each other? For college, I need to install Visual C++ 2010 Express and I will have Visual Studio 2010 Ultimate very soon. I haven't asked the professor about the...
Software
Help with win 7 and visual studio 6!
Hi all, my order of windows 7 is on the way but I wanted to solve a problem I would have once i installed it. Apparently Visual Studio 6 doesnt work with windows 7. I ordered home premium, so i wont be able to use XP mode. Anyone know any ways around this? Thanks
Software

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 12:20.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App