PFE produces the error "Substitution cannot be performed in the specified command line as either no file is currently open, or the current window does not contain a named file"
This is caused by one of two things.
This can be caused by two things.
%Path%;w:\Djgpp\bin
;w:\Djgpp\bin
to the end (do not
overwrite what is already there). The Press the
Set button, followed by the
Apply button. Then you MUST LOG-OUT
AND BACK IN otherwise NT will not recognise the
change to the path.
If after checking these two you still get the same error message
then you can try changing the compile command. Click on the
compile button in PFE and instead of just clicking on OK, change
the Command from:-
gcc %f -o %n.exe
to
w:\Djgpp\bin\gcc %f -o %n.exe
When you try and compile your code you get back a Compiler Output window which contains "<filename>: file not recognized: File format not recognized"
This is cause by not saving the file with a ".c"
extension. C-Code must end in .c For example
assess1.c
When you try and compile your code you get the error
message:-
gcc.exe: <filename>: No such file or directory (ENOENT)
gcc.exe: No input files
This is most often caused by the filename you have used being too long. Although Windows NT can handle long filenames, gcc is a DOS application and can only handle filenames 8 characters long and 3 for the extension. So it is best to keep to short filenames. The easiest way to do this is to just select Save As from the File menu and give your code a new (and shorter) name.
You are only likely to get this error message if you are
compiling your code on UNIX. To fix this, you need to tell gcc
to link the maths library with a command like:-
gcc -o assess assess.c -lm
If you try compiling your code and get a list of error messages
that look something like :-
<filename>: In function `main':
Then the compiler is notifying you of errors in your source code
(rather than any system problems). It is up to you to find and
fix these errors yourself. However, here are a few tips on how
to proceed.
<filename>:76: ......
for (i=1;i<10;i++) { if (i <= oval) { /*Do Something*/ }else{ /*Something Else */ }Than it would be in:-
for (i=1;i<10;i++)
{
if (i <= oval)
{
/*Do Something*/
}else{
/*Something Else */
}