![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Problem Executing Program Via command prompt: Windows vistaI am running Windows Vista Home Premium. I was beginning to learn C programming on my win xp computer. I made the program in a compiler, saved it, compiled it, went to command prompt, cded to the folder the file was stored and then typed then name of the file and hit enter.
Now, for instance, I wrote a file and saved it and compiled it. I opened cmd, cded to the folder, and typed the name of the file and hit enter. The .obj file IS present in the folder my programs are stored in. I get an error that the name of the program is not recognized as an internal or external command, operable program or batch file. Example- The name of the program I made was printf. Saved printf.c in the C folder on my destop. I checked, the compiler created the .obj file in the folder. I open command prompt, cd to the folder, type in 'printf'. And command prompt slaps this in my face: 'printf' is not recognized as an internal or external command, operable program or batch file. |
|
#2
|
|||
|
|||
Re: Problem Executing Program Via command prompt: Windows vistaWhat compiler are you using? Visual Studio? Are you sure there's an acutal program in there called "printf"? Usually, if I make a basic project for a C or C++ program, it makes the program in a folder called "Debug" in the project folder.
|
|
#3
|
|||
|
|||
Re: Problem Executing Program Via command prompt: Windows vistaI am using Miracle C. I save my files in a custom folder.
|
|
#4
|
|||
|
|||
Re: Problem Executing Program Via command prompt: Windows vistaQuote:
So: look for an executable file and go to that directory. The .obj files are not executable. They are intermediate "object" files that are sometimes created by a compiler when building an executable. The executable will be named "something.exe", not "something.obj" Regards, Dave |
|
#5
|
|||
|
|||
Re: Problem Executing Program Via command prompt: Windows vistaThere is no .exe file in the folder
only the src code and .obj file |
|
#6
|
||||
|
||||
Re: Problem Executing Program Via command prompt: Windows vistaAnd the only time I recommend changing compilers is when someone is using Miracle C. I have never heard anything good about it. Try one of these, all free:
Borland 5.5 Open Watcom C++/Fortran Bloodshed DevC MSVC++ Express __________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
Recent GIDBlog
I?m Home by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| Windows C++ Problem with Class and Functions | Alloishus | C++ Forum | 3 | 28-Sep-2006 19:34 |
| Pipeline freeze simulation | darklightred | C++ Forum | 6 | 27-Jul-2006 20:37 |
| Executing a program inside a C# program? | xanstrange | .NET Forum | 2 | 17-Mar-2006 08:53 |
| Runtime Problem involving "printf" in C Program | supamakia | C Programming Language | 2 | 09-Oct-2005 11:09 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The