Sign in to follow this  
BattleBuddha

New to programming need some help!

Recommended Posts

BattleBuddha    100
Awhile back I decided to take my hand at programming. So as I am sure quite alot of you have seen this so please bare with me. I got A Beginners Guide to C++. /* This is a simple C++ program. Call this file Sample.cpp. */ #include <iostream> using namespace std; // A C++ program begins at main(). int main() { cout << "C++ is power programming."; return 0; } I followed the code a T, but when I go to compile the the code in Microsoft Visiual Studio 2008 I get this message in Command Prompt.... "... Is not recongnized as an internal or external command, operable program or batch file" What am I doing wrong?

Share this post


Link to post
Share on other sites
BattleBuddha    100
C:\Users\Nate\Documents\Visuial Studio 2008\Projects\Sample1.cpp>cl -GX Sample1.cpp


C\Users\Nate\Visiual is not recongnized as an internal or external command, operable program or batch file"

I hope that helps :)

Share this post


Link to post
Share on other sites
panic    211
Quote:
C:\Users\Nate\Documents\Visuial Studio 2008\Projects\Sample1.cpp>cl -GX Sample1.cpp


I'm not sure I'm following here. Are you typing the above paragraph into the command window manually? The error message you receive kind of hints towards that anyway. It basically tells you that there is no executable file called "Visuial" located at C:\Users\Nate\Documents\. Which is exactly what you would get if you typed the above paragraph in a "DOS"-window and hit enter, due to the lack of " " around the path which is space-split.

But why you are doing so is beyond me, try hitting F7 in visual studio instead to compile :)

If you are compiling through visual studio by the usual means and still get this error, then I'm afraid your installation of Visual Studio is rather messed up and in desperate need of a reinstall. There is nothing wrong with your code, it's just the compiler that fails to execute.

Share this post


Link to post
Share on other sites
GWDev    286
Hello,

i am not so sure what you are doing exactly, but if you are typing into cmd.exe try this:

Execute vcvars32.bat in C:\Programme\Microsoft Visual Studio 8\VC\bin
use same cmd window to compile.

if this fails, try looking here.

http://msdn.microsoft.com/en-us/library/ms235639%28VS.80%29.aspx


GWDev

Share this post


Link to post
Share on other sites
Zahlman    1682
When you see something in a book like:


C:\Users\Nate\Documents\Visual Studio 2008\Projects\Sample1.cpp>cl -GX Sample1.cpp


The first part up until the '>' is the command prompt. You do not type it as part of your command. Instead, it shows you what directory you should be in, in order to use the command.

It's wrong, anyway, because the file name is not part of the directory path. I assume you have a project named 'Sample1', so that would be part of the directory path.

Here are step-by-step instructions:

1) Open a command window. You should see something like C:\Users\Nate>_, with the underscore blinking.

2) Type cd "Documents\Visual Studio 2008\Projects\Sample1", with the quotes, and hit enter.

3) The next line should now look like C:\Users\Nate\Documents\Visual Studio 2008\Projects\Sample1>_.

4) Type cl -GX Sample1.cpp and hit enter.

Share this post


Link to post
Share on other sites
BattleBuddha    100
Hey guys thank you I finally got it to work, and panic bud I don't know what I am trying to do. I have been an artist and a modeler for so long I thought I would take my hand at the foundation of game design instead of the artistic side.

Share this post


Link to post
Share on other sites
tomasr    100
Hey, good for you for jumping into programming like this! i just did a mentoring project with a middle school student last year, so I know how hard it can be to jump into game dev

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by BattleBuddha
I have been an artist and a modeler for so long I thought I would take my hand at the foundation of game design instead of the artistic side.


C++ has little to do with "the foundation of game design", BTW. In most modern games, it's behind the tools that do the heavy lifting, but a lot (in many cases, the vast majority) of the work is at a much higher level, "scripting" the events. Everything is built in layers, and the real experts are the ones with a grasp on the whole process.

It's not really much different from the 3D art world in that respect, where you have concept artists, modellers, texture artists (both creating the textures and UV mapping and unwrapping), riggers and animators - and then also technical artists (the guys who are talking to the programmers to find out what the polygon count targets are and how big the textures should be - and who understand how to run the exporters, and why UV mapping is called UV mapping).

Also, many programmers feel that what they do is just as "artistic", though perhaps in a quite unconventional sense ;)

Share this post


Link to post
Share on other sites
owiley    257
to do it the manual way you have to know your evironment Which is windows that sits on top of the old DOS. use dir to see if you are in the right location.
type just cl to see if its in the environment path
if not you need to regester it. See the Documents that comes with visual c++ it has it in more detail.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this