Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - I can't get it to run... ;((
ok, I'm just starting with C++ and Compilers are new to me. I read that you have to do path variable setting or something like that. What exactly is that? I just unzip an copied everything to C: in the dos-enviroment I can start the dmc.exe with the following path: c:\dm\bin\dmc but if I try: c:\dm\bin\dmc test I get the following error: Fataf error: unable to open input file 'test' ---errrorlevel 1 my test-file has the ending test.cpp and looks as followed: #include <iostream> using namespace std; int main() { cout << "Testing 1, 2 ,3\n"; return 0; } for some help I would be very thankful... Jul 05 2003
Well in your dos environment, which actually will be a win32 command prompt or 'console' when you are using NT/2000/XP, type: C:\>set Somewhere along those lines you will see: Path=C:\WINNT\System32.................. This setting defines which directories will be searched when issueing a command not found in the current directory. To set your path environment variable only for the current Console type: c:\>set path=C:\dm\bin;%PATH% Check the change with c:\>path and voila there it is now you can type dmc in any directory and it will be executed. To make this path setting permanent consult your OS help. To compile test.cpp you have to type: dmc test.cpp Good Luck Arjan Knepper Tobi wrote:ok, I'm just starting with C++ and Compilers are new to me. I read that you have to do path variable setting or something like that. What exactly is that? I just unzip an copied everything to C: in the dos-enviroment I can start the dmc.exe with the following path: c:\dm\bin\dmc but if I try: c:\dm\bin\dmc test I get the following error: Fataf error: unable to open input file 'test' ---errrorlevel 1 my test-file has the ending test.cpp and looks as followed: #include <iostream> using namespace std; int main() { cout << "Testing 1, 2 ,3\n"; return 0; } for some help I would be very thankful... Jul 05 2003
Hi Arjan, thanks a lot so far. I have to admit that I never worked with the console earlier. To set the path variable worked I guess, since I can start the dmc.exe now without typing a path... just dmc but still it doesn't open the test.cpp which is in the same folder as the dmc.exe and just gives out the same error as before(unable to open input file). do I have to do something special with the file (save it in a certain way,...) or... I didn't do anything else than extracting the zip-file to C: I'm very thankful for help... and if you explain, just think of me as a 4 year old ;)) Jul 05 2003
"Tobi" <Tobi_member pathlink.com> wrote in message news:be6ghp$1pho$1 digitaldaemon.com...but still it doesn't open the test.cpp which is in the same folder as the dmc.exe and just gives out the same error as before(unable to open input Jul 06 2003
If the file is in your C:\dm\bin directory you need to type: dmc c:\dm\bin\test.cpp You could also make a directory for your small programs, type: cd \ mkdir cpp move c:\dm\bin\test.cpp c:\cpp cd c:\cpp dmc test.cpp This way you won't clutter your digital mars hierarchy with objects and unrelated source(.c, c.pp) and executables(.exe) "Walter" <walter digitalmars.com> wrote in message news:be8iln$gfd$1 digitaldaemon.com..."Tobi" <Tobi_member pathlink.com> wrote in message news:be6ghp$1pho$1 digitaldaemon.com...but still it doesn't open the test.cpp which is in the same folder as Jul 10 2003
If you download the Environment Expander (NVX) tool from the system tools page on my website - http://synesis.com.au/r_systools.html - you'll find that it helps you see what is in your environment a lot easier. For example, if you type nvx -i -l -p that gives you a tokenised list of INCLUDE, LIB and PATH environment variables, which for C/C++ developers are very useful. Doing that on my system within a DMC++ setup gives INCLUDE: H:\STLSoft\Identities\STLSoft\stlsoft P:\PROGRAMS\DM\beta\DM\include P:\PROGRAMS\DM\beta\DM\include\win32 P:\PROGRAMS\DM\beta\DM\stl P:\PROGRAMS\DM\beta\DM\mfc\include LIB: P:\PROGRAMS\DM\beta\DM\lib PATH: P:\PROGRAMS\DM\beta\DM\BIN F:\WINXP\system32 F:\WINXP F:\WINXP\system32\WBEM P:\Program Files\Metrowerks\CodeWarrior\8.0\Other Metrowerks Tools\Command Line Tools P:\Program Files\Metrowerks\CodeWarrior\8.0\Win32-x86 Support\Libraries\Runtime\Libs\MSL_All-DLLs P:\Program Files\Metrowerks\CodeWarrior\8.0\Win32-x86 Support\Libraries\MFC\Libs P:\SDKs\Microsoft SDK\Bin P:\SDKs\Microsoft SDK\Bin\WinNT X:\bin c:\bin P:\Program Files\doxygen\bin P:\Programs\ActiveState\Python22 P:\Programs\ActiveState\Perl\bin You can also type in any other environment variable you fancy, as in H:\>nvx VJSHARPTOOLS P:\Program Files\Microsoft Visual J# .NET\Framework\Bin F:\WINXP\Microsoft Visual JSharp .NET\Framework\v1.0.4205 There are other useful parts to it. For example, it can copy the items to the clipboard, and it can highlight missing directories in environment variables, as in H:\>nvx -p -x P:\PROGRAMS\DM\beta\DM\BIN F:\WINXP\system32 F:\WINXP F:\WINXP\system32\WBEM P:\Program Files\Metrowerks\CodeWarrior\8.0\Other Metrowerks Tools\Command Line Tools P:\Program Files\Metrowerks\CodeWarrior\8.0\Win32-x86 Support\Libraries\Runtime\Libs\MSL_All-DLLs P:\Program Files\Metrowerks\CodeWarrior\8.0\Win32-x86 Support\Libraries\MFC\Libs P:\SDKs\Microsoft SDK\Bin P:\SDKs\Microsoft SDK\Bin\WinNT * X:\bin c:\bin P:\Program Files\doxygen\bin P:\Programs\ActiveState\Python22 P:\Programs\ActiveState\Perl\bin Indicating that X:\bin does not exist. Hope that helps "Tobi" <Tobi_member pathlink.com> wrote in message news:be625r$1do4$1 digitaldaemon.com...ok, I'm just starting with C++ and Compilers are new to me. I read that you have to do path variable setting or something like that. What exactly is that? I just unzip an copied everything to C: in the dos-enviroment I can start the dmc.exe with the following path: c:\dm\bin\dmc but if I try: c:\dm\bin\dmc test I get the following error: Fataf error: unable to open input file 'test' ---errrorlevel 1 my test-file has the ending test.cpp and looks as followed: #include <iostream> using namespace std; int main() { cout << "Testing 1, 2 ,3\n"; return 0; } for some help I would be very thankful... Jul 05 2003
|