Board index » cppbuilder » [Linker Fatal Error] Fatal: Expected a file name:

[Linker Fatal Error] Fatal: Expected a file name:


2003-06-28 06:29:31 PM
cppbuilder16
This is the only error I get when compiling. I did an internet search and found a few people who said it is not a source code error, however they did not say how to fix it. Anyone know how to fix this? At one point the cpp was compiling and running fine, however even when I // the new code (making it effectively the same as when it worked) it still gives me this error. Thanks for the help.
 
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

Hi,
go to Project|Options|Directories & Conditionals and check all path values
for include, lib etc. Sometimes Builder mix this up and create illegal path
names. Also take a look at the *.cpp file of your project and check the
USELIB, USERES etc. paths at the beginning of the file.
Thomas
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

"ta0kira" < XXXX@XXXXX.COM >wrote:
Quote

This is the only error I get when compiling. I did an
internet search and found a few people who said it is not a
source code error, however they did not say how to fix it.
Anyone know how to fix this? At one point the cpp was
compiling and running fine, however even when I // the new
code (making it effectively the same as when it worked) it
still gives me this error. Thanks for the help.
Adding to what Thomas said: Some versions of BCB have problems
with pathnames that contain a minus sign '-'.
PS: When writing to this newsgroup you should wrap your lines.
 

{smallsort}

Re:[Linker Fatal Error] Fatal: Expected a file name:

Hi,
please check under Project | Options | Directories all the specified
directories for include and lib if there are illegal path entries. Also
paths with characters like - and + can be illegal.
Thomas
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

Im still having the same problem. This is the exact message error i am getting:
[Linker Fatal Error] Fatal: Expected a file name:
The program below compile without an error or warning
but I cant run it and see any output.
I am using Borland c++ builder 6.0 [Build 10.157]
thanks.
#include <iostream>
using namespace std;
int Add (int x, int y){ // Function Add
cout << "In Add(), received " << x << " and " << y << "\n";
return (x-y); // Returns value to c
}
int main(){ // Function main
cout << "I'm in main()!\n";
// declared integers a, b, c
int a;
int b;
int c;
cout << " Enter two numbers: ";
cin>>a;
cin>>b;
cout << "\nCalling Add()\n";
c=Add(a,b);
cout << "\nBack in main().\n"
<< "C was set to " << c
<< "\nExiting....\n\n";
return 0;
}
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

Did you install C++Builder into, or save your project in, any directories
with non-alphanumeric characters? If there's a + or other "special"
character in the path, the linker will have trouble parsing it.
-- YH --
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

I am having some trouble compiling my programs. I get the following error:
[Linker Fatal Error] Fatal: Expected a file name:
Pressing F1 on this error gives me the following:
Fatal error. There's a problem with your linker command specifications on
the command line, ILINK32.CFG file, or response file.
Not sure if this has anything to do with it or not, but my ILINK32.CFG look
like this:
-L"C:\Program Files\Borland\CBuilder6\lib";"C:\Program
Files\Borland\CBuilder6\lib\obj";"C:\Program
Files\Borland\CBuilder6\lib\release"
It does it on new projects only, but only when I try and save it in specific
folders.
I can't really say which ones because some work fine and some do not. If I
run
a newly created program before saving it's fine, this only happens after I
save it.
Other programs that I have already created seem to work fine, so I am a
little
confused as to what the problem is.
Thanks!
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

oLiVeS wrote:
Quote
It does it on new projects only, but only when I try and save it in specific
folders.
You probably have a path containing invalid characters (I mean invalid
for BCB). Do you by chance have a folder called C++? If it's the case,
rename it to Cpp or whatever. BCB doesn't like '+' characters in a path
name.
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, C++BuilderX, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

Quote
You probably have a path containing invalid characters (I mean invalid
for BCB). Do you by chance have a folder called C++? If it's the case,
rename it to Cpp or whatever. BCB doesn't like '+' characters in a path
name.
Even though I have never had an issue with the folder called C++ before.
I changed it to Cpp, but the same problem still occurs.
Thanks!
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

If you are on Win98 then there are issues related to Win98 and not to the
compiler which cause it to occasionally not find ilink32.cfg and therefore
not get the proper linker configuration. When I was running on Win98 I
placed a copy of ilink32.cfg in the root directory so that whenever the
problem occurred I could easily copy the file to the current directory.
Note that Mr Leunen's statement is also correct for all Windows machines,
not just for machines which have the compiler installed. A '+' is a command
line operator commanding that that the OS concatenate files. It should not
be used in a file or directory name.
. Ed
Quote
oLiVeS wrote in message
news: XXXX@XXXXX.COM ...
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

Quote
If you are on Win98 then there are issues related to Win98 and not to the
compiler which cause it to occasionally not find ilink32.cfg and therefore
not get the proper linker configuration. When I was running on Win98 I
placed a copy of ilink32.cfg in the root directory so that whenever the
problem occurred I could easily copy the file to the current directory.
I am running Win2000 SP-4. I tried what you said, even though I am not
running Win98. Placing a copy of the ilink32.cfg in my project folder, but
that did not solve the problem.
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

That was only for Win98. Win2K does not have that problem. I did not
remember seeing what OS you were using in your messages so spoke of the
Win98 problem in the hopes that it would help.
Try this:
Pull up the project file (*.bpr file) in an editor with the IDE not running.
Look at the entries. Most of the lines are XML statements that start with
<somename and end with />For instance:
<SPARELIBS value=""/>
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi
vclx.bpi bdertl.bpi vcldbx.bpi ibxpress.bpi dsnap.bpi cds.bpi
bdecds.bpi qrpt.bpi teeui.bpi indy.bpi bcb2kaxserver.bpi"/>
<PATHCPP value=".;"/>
Look for the following things:
-a path ending in a backslash so that the ending double quote follows like
this
name\othername\"
In the case above remove the trailing backslash.
-a path or options or other thing in which stuff is repeated endlessly, such
as a path that is repeated 20 or more times.
Remove all but one of the items. If the item makes no sense, remove all of
them.
-a path that contains a directory name with plus or minus signs in it such
as C++
Fix things so that a directory named that way is not in the path to the
compiler, the path ot any items such as libraries and header files used and
not in the path to the project.
. Ed
Quote
oLiVeS wrote in message
news: XXXX@XXXXX.COM ...
>If you are on Win98 then there are issues related to Win98
>and not to the compiler which cause it to occasionally not
>find ilink32.cfg and therefore not get the proper linker
>configuration. When I was running on Win98 I placed a copy
>of ilink32.cfg in the root directory so that whenever the
>problem occurred I could easily copy the file to the current
>directory.

I am running Win2000 SP-4. I tried what you said, even
though I am not running Win98. Placing a copy of the ilink32.cfg
in my project folder, but that did not solve the problem.
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

I've had problems like this as well (with BCB5) with paths that contain
spaces. Unfortunately the default install goes in "program files".
Changing my installation to not have spaces in the path solved it for me.
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
That was only for Win98. Win2K does not have that problem. I did not
remember seeing what OS you were using in your messages so spoke of the
Win98 problem in the hopes that it would help.

Try this:

Pull up the project file (*.bpr file) in an editor with the IDE not running.
Look at the entries. Most of the lines are XML statements that start with
<somename and end with />For instance:

<SPARELIBS value=""/>
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi
vclx.bpi bdertl.bpi vcldbx.bpi ibxpress.bpi dsnap.bpi cds.bpi
bdecds.bpi qrpt.bpi teeui.bpi indy.bpi bcb2kaxserver.bpi"/>
<PATHCPP value=".;"/>

Look for the following things:

-a path ending in a backslash so that the ending double quote follows like
this
name\othername\"

In the case above remove the trailing backslash.

-a path or options or other thing in which stuff is repeated endlessly, such
as a path that is repeated 20 or more times.

Remove all but one of the items. If the item makes no sense, remove all of
them.

-a path that contains a directory name with plus or minus signs in it such
as C++

Fix things so that a directory named that way is not in the path to the
compiler, the path ot any items such as libraries and header files used and
not in the path to the project.

. Ed

>oLiVeS wrote in message
>news: XXXX@XXXXX.COM ...
>>If you are on Win98 then there are issues related to Win98
>>and not to the compiler which cause it to occasionally not
>>find ilink32.cfg and therefore not get the proper linker
>>configuration. When I was running on Win98 I placed a copy
>>of ilink32.cfg in the root directory so that whenever the
>>problem occurred I could easily copy the file to the current
>>directory.
>
>I am running Win2000 SP-4. I tried what you said, even
>though I am not running Win98. Placing a copy of the ilink32.cfg
>in my project folder, but that did not solve the problem.


 

Re:[Linker Fatal Error] Fatal: Expected a file name:

Quote
I've had problems like this as well (with BCB5) with paths that contain
spaces. Unfortunately the default install goes in "program files".
Changing my installation to not have spaces in the path solved it for me.
It seems to be working now, but I not really sure why because I didn't
really
do anything. It just seems to be working though, whatever the reason it is
working. I did install in the default folder, but it is working so I have
no
reason to fix something that is no longer broken.
Thank you everyone for all of your input.
 

Re:[Linker Fatal Error] Fatal: Expected a file name:

Hello, I have downloaded Borland C++ 6 on 2 computers, one at home with windows xp and one in my office with windows 2000. Neither one will compile even the simplest of programs, and I keep getting this error: {[Linker Fatal Error] Fatal: Expected a file name:}. I have used this same compiler before with no problems to do simple mathematical calculations and have never recieved this error until I reinstalled the software recently, because I reinstalled windows. It does not compile at home or in office and gives me the same error message on both cp's. Even if I simply create a new form and do NOTHING to it, it will still give me this error. Am I missing a library somewhere? I am sorry this question is so long.
Thanks,
Eric