hu_wei_89 wrote: > hi all, > I'm facing a problem when compiling my source code using the MS.Visual > Basic C++ 2008 edition. I uses the command line option. However when I > want to compile the source code that I had written earlier using notepad > ( that I have already save it as Sample.cpp to my desktop), it appears > a error message saying sth like this>> > > C:\Program Files\Microsoft Visual Studio 9.0\VC>cl -EHsc Sample.cpp > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 > for 80x86 > Copyright (C) Microsoft Corporation. All rights reserved. > > Sample.cpp > c1xx : fatal error C1083: Cannot open source file: 'Sample.cpp': No > such file or > directory > > what does that mean? I'm really new to this stuff so I would appreciate > it if any of you can help me. Thanks
Well, it means the compiler can't find the source file on the path. You are using the compiler incorrectly anyway. There should be several vcvars*.bat files somewhere in your VC++ directory structure that are designed to set up a proper compiling environment. The directory you need to be in to compile code is the directory where Sample.cpp resides (compiling files inside the same directory as the compiler binaries is a VERY bad idea). That all said, programming in Notepad and compiling on the command-line is great for the one-time experience of knowing how that works. But, as a new programmer, you will want the full power of the world's best debugger, which should be a part of the IDE that you appear to want to avoid. Being able to step through code line-by-line and hover over variables to see their current values is a huge teaching tool in itself. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
