Monday, May 24, 2010

C++, can't see a file, very simple question?

I am trying to run a simple program and I've installed Borland C++ compiler for free on my computer. The code is supposed to simply write Hello World, on the screen in the command prompt box. The book I have tells me to type in bcc32 hello.cpp into the command prompt box to run the program, but I get the error message. It recognizes the bcc32 command, but then runs the E2194 message. I had to change the path in environment variables first since the bcc32 was not recognized at first, but after changing the path, this works. I have also created the two necessary text files bcc32.cfg and ilink32.cfg. The path is c:\Borland\Bcc55\Bin. I have the hello.cpp program in what I think is the right spot, but it seems to not be able to find it. Can anyone help me. I need to know how to tell the computer or program where to "look" for this file.

C++, can't see a file, very simple question?
If configured correctly, it should be looking for the hello.cpp file in the current directory. If not, try fully qualifying the program, that is:





bcc32 c:\blahblahblah\hello.cpp





If that works, then you've got a configuration issue. Something should be set to check the current path first.


No comments:

Post a Comment