Alright, I'm just starting with this whole programming thing, and I'm trying to compile a small file for C++. I hear there's some problems with compiling in Vista, but I don't know. I run the program in administrator and enter the following as I have been told to:
C:\...>notepad blahblah.cpp
(Paste code, save, exit)
C:\...>cl /EHsc blahblah.cpp
c1xx : fatal error C1083: Cannot open source file: 'blahblah.cpp': No such file or directory.
Any suggestions?
This seems like it might be a tad important, so help would be appreciated...I'm sure someone knows what I'm talking about.
Why don't use you use an IDE ^_^
Anyways, works fine for me :S
It all depends on the working directory and paths given to the compiler.
Try
[quote]
cl /EHsc "C:\path\to\blahblah.cpp"
[/quote]
Your best bet is, like Zeeky said, to use an IDE.
I am using an IDE, Visual C++ 2008.
But I'll try that path thing. DO I need to include the quotes?
If you're using Visual C++ there should be no need for this. And yes you include the quotes.
No need to compile?
:ughh:
Yeah, I know, I'm facepalming at myself too.
Look, I just have no clue how to use this program.
Press F7 in your IDE.
Okay, maybe my real question here should be, where can I find a good guide to every part of this damn program?
Because really, everything I've looked at is not helpful at all, including the fucking F1.
Best site if you ask me. But it took me a while before I really get the hang of the stuff.
[url]http://www.cplusplus.com[/url]
You might just wanna try Google on that... :3
Well, thanks for that help anyway.
One more small thing. I got the compile-ness to work, but I have no clue how to execute the .exe that results nor where it is actually placed on my drive.
You should have a Visual Studio 2008-folder in My Documents. There's a Projects-folder and you should be able to find it from there :)
I mean when I use the console.
I get:
/out:blah.exe
blah.obj
Yeah, after you've compiled it you have to link it.
But you don't need to care about that stuff if you'd just use your IDE.
Except I don't know how to. >:|
[QUOTE=ZeekyHBomb;16043258]Press F7 in your IDE.[/QUOTE]
To build the project.
I also told you how to find the resulting executable.
You can easily find a beginners guide for VS with Google.
Alright, when I start up the program, I'm supposed to begin a new project?
Why, if I just want to compile and run one file?
When I do make one .cpp, it will not let me do anything with it.
I looked in my folder and the .exe isn't anywhere to be found.
And finally, I've searched high and low already and nothing tells me how to use this god damn program.
Yes.
Because.
And I found [url=http://www.dreamincode.net/forums/showtopic49569.htm]this[/url] fairly easy with the words Getting Started with Visual Studio C++ 2008 in Google.
I kind of hate you, on some level.
But whatever, thanks bro. I'll check it out.
If you can't google just give up now.
Sorry, you need to Log In to post a reply to this thread.