Linker fatal error expected a file name

linker fatal error expected a file name

Expected a file name. F0520016. [Message]. "file" is not a valid source file name. F0520035. [Message]. #error directive: character string. [Explanation]. I'm using C++ Builder 6.0. The IDE works some time (10 - 30 hours) and then without provocation it throws this error. Even when I try to build an different. If the "$<" part is missing that will cause this error. If that is the case, you can add the.cfg file as../filename.cfg at the end of the.

Similar video

How to Solve Visual Studio LNK1168 error

Linker fatal error expected a file name - opinion

( C++) Expected a file name

Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

 

Link error.

 

IDE: C++ Builder 6.0

Project type: VCL

 

 

 

 

 

Full error message

 

 

 

 

 

 

Cause

 

This error occurs when you save your project in a folder with a 'strange' name, e.g. 'C:\C++'.

 

 

 

 

 

Solution

 

Your current program has become useless, so cut out all code and paste it in, for example, Notepad. Then do the following: 'Close All', start a new application, paste your code correctly, 'Save All' in a 'normally' named folder, for example 'C', 'Cpp', 'CPlusPlus', 'Programming'.

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

C Board

  1. Registered User
    Join Date
    Jul 2005
    Posts
    1

    [Linker Fatal Error] Fatal: Expected a file name

    I had created a path: "C:\c++\.." and had my source in there.
    BCB 6.0 came up with the above error.
    To fix it:
    1. Close BCB
    2. Clear the ENTIRE registry of all references to the path "C:\c++"
    3. Delete all the most recent config files in \bin, \lib, \projects in the bcb install folder.
    4. Open BCB and create a new project

    Couldn't find the solution anywhere, so when I solved it, thought I'd post it!!

    Ciao,
    Checco

  2. and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,164
    > 3. Delete all the most recent config files in \bin, \lib, \projects in the bcb install folder.
    And in doing so, trashed your installation

    How about reinstalling it, and trying a "hello world" program?

Contact US

INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Thanks. We have received your request and will respond promptly.

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Us!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Tek-Tips Posting Policies

Contact US

Fatal Linker Error, Expected a file name

Fatal Linker Error, Expected a file name

bwszeg(Programmer)

(OP)

Hi,

I'm new to using C++ Builder 6.0. When I create a blank project  (Application) and save all the components by their default name, compiling works.

However, when I save anything of the project under a different directory I get the "Fatal Linker Error, Expected a file name" message.

I use the save project option in the file menu.

Any help is greatly appreciated

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Board index » cppbuilder » [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: [email protected] ...
>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.
 

Linker Tools Error LNK2001

  • Article
  • 10 minutes to read

unresolved external symbol "symbol"

The compiled code makes a reference or call to symbol. The symbol isn't defined in any libraries or object files searched by the linker.

This error message is followed by fatal error LNK1120. To fix error LNK1120, first fix all LNK2001 and LNK2019 errors.

There are many ways to get LNK2001 errors. All of them involve a reference to a function or variable that the linker can't resolve, or find a definition for. The compiler can identify when your code doesn't declare a symbol, but not when it doesn't define one. That's because the definition may be in a different source file or library. If your code refers to a symbol, but it's never defined, the linker generates an error.

What is an unresolved external symbol?

A symbol is the internal name for a function or global variable. It's the form of the name used or defined in a compiled object file or library. A global variable is defined in the object file where storage is allocated for it. A function is defined in the object file where the compiled code for the function body is placed. An external symbol is one referenced in one object file, but defined in a different library or object file. An exported symbol is one that's made publicly available by the object file or library that defines it.

To create an application or DLL, every symbol used must have a definition. The linker must resolve, or find the matching definition for, every external symbol referenced by each object file. The linker generates an error when it can't resolve an external symbol. It means the linker couldn't find a matching exported symbol definition in any of the linked files.

Compilation and link issues

This error can occur:

  • When the project is missing a reference to a library (.LIB) or object (.OBJ) file. To fix this issue, add a reference to the required library or object file to your project. For more information, see lib Files as linker input.

  • When the project has a reference to a library (.LIB) or object (.OBJ) file that in turn requires symbols from another library. It may happen even if you don't call functions that cause the dependency. To fix this issue, add a reference to the other library to your project. For more information, see Understanding the classical model for linking: Taking symbols along for the ride.

  • If you use the /NODEFAULTLIB or /Zl options. When you specify these options, libraries that contain required code aren't linked into the project unless you've explicitly included them. To fix this issue, explicitly include all the libraries you use on the link command line. If you see many missing CRT or Standard Library function names when you use these options, explicitly include the CRT and Standard Library DLLs or library files in the link.

  • If you compile using the /clr option. There may be a missing reference to . For more information on how to fix this issue, see Initialization of mixed assemblies.

  • If you link to the release mode libraries when building a debug version of an application. Similarly, if you use options /MTd or /MDd or define and then link to the release libraries, you should expect many potential unresolved externals, among other problems. Linking a release mode build with the debug libraries also causes similar problems. To fix this issue, make sure you use the debug libraries in your debug builds, and retail libraries in your retail builds.

  • If your code refers to a symbol from one library version, but you link a different version of the library. Generally, you can't mix object files or libraries that are built for different versions of the compiler. The libraries that ship in one version may contain symbols that can't be found in the libraries included with other versions. To fix this issue, build all the object files and libraries with the same version of the compiler before linking them together. For more information, see C++ binary compatibility between Visual Studio versions.

  • If library paths are out of date. The Tools > Options > Projects > VC++ Directories dialog, under the Library files selection, allows you to change the library search order. The Linker folder in the project's Property Pages dialog box may also contain paths that could be out of date.

  • When a new Windows SDK is installed (perhaps to a different location). The library search order must be updated to point to the new location. Normally, you should put the path to new SDK include and lib directories in front of the default Visual C++ location. Also, a project containing embedded paths may still point to old paths that are valid, but out of date. Update the paths for new functionality added by the new version that's installed to a different location.

  • If you build at the command line, and have created your own environment variables. Verify that the paths to tools, libraries, and header files go to a consistent version. For more information, see Use the MSVC toolset from the command line.

Coding issues

This error can be caused by:

  • Mismatched case in your source code or module-definition (.def) file. For example, if you name a variable in one C++ source file and try to access it as in another, this error is generated. To fix this issue, use consistently spelled and cased names.

  • A project that uses function inlining. It can occur when you define the functions as in a source file, rather than in a header file. Inlined functions can't be seen outside the source file that defines them. To fix this issue, define the inlined functions in the headers where they're declared.

  • Calling a C function from a C++ program without using an declaration for the C function. The compiler uses different internal symbol naming conventions for C and C++ code. The internal symbol name is what the linker looks for when resolving symbols. To fix this issue, use an wrapper around all declarations of C functions used in your C++ code, which causes the compiler to use the C internal naming convention for those symbols. Compiler options /Tp and /Tc cause the compiler to compile files as C++ or C, respectively, no matter what the filename extension is. These options can cause internal function names different from what you expect.

  • An attempt to reference functions or data that don't have external linkage. In C++, inline functions and data have internal linkage unless explicitly specified as . To fix this issue, use explicit declarations on symbols referred to outside the defining source file.

  • A missing function body or variable definition. This error is common when you declare, but don't define, variables, functions, or classes in your code. The compiler only needs a function prototype or variable declaration to generate an object file without error, but the linker can't resolve a call to the function or a reference to the variable because there's no function code or variable space reserved. To fix this issue, make sure to define every referenced function and variable in a source file or library you link.

  • A function call that uses return and parameter types or calling conventions that don't match the ones in the function definition. In C++ object files, Name decoration encodes the calling convention, class or namespace scope, and return and parameter types of a function. The encoded string becomes part of the final decorated function name. This name is used by the linker to resolve, or match, calls to the function from other object files. To fix this issue, make sure the function declaration, definition, and calls all use the same scopes, types, and calling conventions.

  • C++ code you call, when you include a function prototype in a class definition, but don't include the implementation of the function. To fix this issue, be sure to provide a definition for all class members you call.

  • An attempt to call a pure virtual function from an abstract base class. A pure virtual function has no base class implementation. To fix this issue, make sure all called virtual functions are implemented.

  • Trying to use a variable declared within a function (a local variable) outside the scope of that function. To fix this issue, remove the reference to the variable that isn't in scope, or move the variable to a higher scope.

  • When you build a Release version of an ATL project, producing a message that CRT startup code is required. To fix this issue, do one of the following,

    • Remove from the list of preprocessor defines to allow CRT startup code to be included. For more information, see General property page (Project).

    • If possible, remove calls to CRT functions that require CRT startup code. Instead, use their Win32 equivalents. For example, use instead of . Known functions that require CRT startup code are some of the string and floating point functions.

Consistency issues

There's currently no standard for C++ name decoration between compiler vendors, or even between different versions of the same compiler. Object files compiled with different compilers may not use the same naming scheme. Linking them can cause error LNK2001.

Mixing inline and non-inline compile options on different modules can cause LNK2001. If a C++ library is created with function inlining turned on (/Ob1 or /Ob2) but the corresponding header file describing the functions has inlining turned off (no keyword), this error occurs. To fix this issue, define the functions in the header file you include in other source files.

If you use the compiler directive, make sure you've set a value of 2 or greater, and make sure you also use the /Ob1 or /Ob2 compiler option.

This error can occur if you omit the LINK option /NOENTRY when you create a resource-only DLL. To fix this issue, add the /NOENTRY option to the link command.

This error can occur if you use incorrect /SUBSYSTEM or /ENTRY settings in your project. For example, if you write a console application and specify /SUBSYSTEM:WINDOWS, an unresolved external error is generated for . To fix this issue, make sure you match the options to the project type. For more information on these options and entry points, see the /SUBSYSTEM and /ENTRY linker options.

Exported .def file symbol issues

This error occurs when an export listed in a .def file isn't found. It could be because the export doesn't exist, is spelled incorrectly, or uses C++ decorated names. A .def file doesn't take decorated names. To fix this issue, remove unneeded exports, and use declarations for exported symbols.

Use the decorated name to find the error

The C++ compiler and linker use Name Decoration, also known as name-mangling. Name decoration encodes extra information about the type of a variable in its symbol name. The symbol name for a function encodes its return type, parameter types, scope, and calling convention. This decorated name is the symbol name the linker searches for to resolve external symbols.

A link error can result if the declaration of a function or variable doesn't exactly match the definition of the function or variable. That's because any difference becomes part of the symbol name to match. The error can happen even if the same header file is used in both the calling code and the defining code. One way it may occur is if you compile the source files by using different compiler flags. For example, if your code is compiled to use the calling convention, but you link to a library that expects clients to call it using the default or calling convention. In this case, the symbols don't match because the calling conventions are different.

To help you find the cause, the error message shows you two versions of the name. It displays both the "friendly name," the name used in source code, and the decorated name (in parentheses). You don't need to know how to interpret the decorated name. You can still search for and compare it with other decorated names. Command-line tools can help to find and compare the expected symbol name and the actual symbol name:

  • The /EXPORTS and /SYMBOLS options of the DUMPBIN command-line tool are useful here. They can help you discover which symbols are defined in your .dll and object or library files. You can use the symbols list to verify that the exported decorated names match the decorated names the linker searches for.

  • In some cases, the linker can only report the decorated name for a symbol. You can use the UNDNAME command-line tool to get the undecorated form of a decorated name.

Additional resources

For more information, see the Stack Overflow question "What is an undefined reference/unresolved external symbol error and how do I fix it?".

While extracting .NET resources from Alchemy Catalyst, an error is reported in the Result pane:

ALINK: error 1026: The version specified 'xxxxxx' is invalid.

This error is due to over translation. The Assembly Version found in the Version resource of the .NET assembly should not be translated/modified. See the example below in which the Version resource of GoogleMT.dll assembly has been pseudo translated and the error is reported on extraction.

Revert the translation and lock string so it cannot be translated by mistake.

ErrorDescriptional1001Internal compiler error

Try to determine whether Al.exe is failing because of its inability to parse unexpected syntax. Then, contact Microsoft Product Support Services.

al1002Out of memory

Al.exe ran out of memory and stopped. Increase the amount of available memory.

al1003Compiler option ‘option’ must be followed by an argument

Al.exe expected an argument to be passed to a command-line option. For example, if you specify /algid:, you must pass an algorithm identifier.

al1004Unexpected common language runtime initialization error — ‘reason’

Al.exe reported an error with the installation of Visual Studio or the common language runtime for the specified reason.

al1005File ‘file’ too big to open

All files opened by Al.exe must be smaller than 4 gigabytes (GB).

al1006Response file ‘file’ was already included

The same response file was specified (@file) more than once on the command line. The response file can only be included once.

al1007Error opening response file ‘file’ — ‘reason’

Al.exe cannot open the specified response file for the specified reason.

al1008Missing file specification for ‘option’ command-line option

Al.exe expected a file to be passed to a command-line option. For example, if you specify the /out option, you must specify a file.

al1009Can’t open ‘file’ for writing

Al.exe was unable to write to a file, such as the output assembly file. The disk might be full, the file might be read-only, or you might not have permissions to the file.

al1010Command-line syntax error: Missing ‘:text’ for ‘option’ option

Al.exe expected an argument to be passed to a command-line option. For example, if you specify the /title option, you must pass a string.

al1011File ‘file’ is an executable file and cannot be opened as a text file

A binary file was specified where a text file was expected. For example, this error occurs if a binary file is passed on the command line as a response file.

al1012‘value’ is not a valid setting for option ‘option’

An unexpected value was passed to a command-line option. For example, this error occurs if you specify an invalid value to the /target option.

al1013Unrecognized command-line option: ‘option’

An invalid command-line option was specified.

al1014Unexpected initialization error — ‘reason’

Al.exe detected a COM initialization failure. This might be caused by a lack of memory, but a more likely cause is the system DLL files. You should see a similar error if you run any Automation-aware or COM-aware program, such as Microsoft Visual Studio.

Reinstall the operating system.

al1015Unable to find messages file ‘alinkui.dll’

Al.exe requires Alinkui.dll. Make sure that this file is on your path. If necessary, copy it from the product CD.

al1016No valid input files were specified

Al.exe requires one or more input files that do not have assembly information.

al1017No target file name was specified

The required /out option specifying the target file name was missing.

al1018Required file ‘file’ could not be loaded

Certain DLL files cannot be loaded. Reinstall Visual Studio or the Windows Software Development Kit (SDK).

al1019Metadata failure while creating assembly — reason

Generation of the assembly was interrupted for the specified reason. For example, this error occurs if a file that you specify with the /win32res option is not found.

al1020Ignoring included assembly ‘file’

An input file that contained an assembly was specified. Al.exe input files cannot contain assemblies.

al1021‘setting’ : overriding previous setting

A module had a value for a particular setting, possibly assigned through custom attributes, which was overridden with a value passed using an Al.exe command-line option.

al1022Error reading embedded resource ‘file’ — reason

Al.exe cannot read the file passed to the /embedresource option for the specified reason.

al1023Error embedding resource ‘file’ — reason

The operating system cannot embed the resource file in the assembly for the specified reason.

al1025ComType record ‘record’ points to an invalid file record ‘record’

Metadata in the input module is invalid. The tool that produced the module must be fixed.

al1026The version specified ‘version’ is invalid

See information about the /version option for valid formats.

al1028Key file ‘file’ is missing the private key needed for signing

A key file that contains only the public key was passed to the /keyfile option. Use the Strong Name Tool (Sn.exe) to generate a file that has both a public and private key, as shown in the following command.

sn -k keypair.snk. al1029The key container name ‘container’ does not exist

The value passed to the /keyname option is not a valid container. Use the Strong Name Tool (Sn.exe) to create a container.

al1030The cryptographic service is not installed properly or does not have a suitable key provider

You might have to either reinstall the operating system or install some cryptographic utility that was that is used to create the key.

al1031Error reading icon ‘file’ — reason

Al.exe cannot read the file that was passed to the /win32icon option for the specified reason

al1032Error generating resources for ‘file’ — reason

Al.exe cannot create a file because of insufficient disk space or some other error. This error occurs when you specify the /win32icon option (which generates an .ico file) or do not specify the /win32res option (which generates a file that has resource information).

If you cannot resolve the file generation problem, use /win32res, which specifies a file that can contain version or bitmap (icon) information.

al1033Assembly custom attribute ‘attribute’ was specified multiple times with different values

Different values were passed to two occurrences of the same custom attribute in source modules that are specified as input to Al.exe.

al1034Assembly ‘file’ cannot be copied or renamed

While using the Al.exe syntax that enables you to both specify an input file and copy it, a name conflict arose that stopped the compiler. For example, this error occurs if you specify input.dll,somename.dll /out:somename.dll.

al1035Libraries cannot have an entry point

You cannot specify both the /target:lib option (the default) and the /main option.

al1036Entry point required for executable applications

When using the /target:exe or /target:win option, you must also specify the /main option.

al1037Unable to find the entry point method ‘main’

Al.exe cannot find a Main method at the location specified by the /main option.

al1039Initialization of global assembly cache manager failed — reason

Reinstall Visual Studio or the Windows SDK.

al1040Failed to install assembly into cache — reason

Only signed assemblies can be installed into the cache.

al1041‘method’: cannot be the entry point because the signature or visibility is incorrect, or it is generic

A method was specified with the /main option, but that method is not static, does not return int or void, was generic, or has invalid arguments.

al1042‘exe’: EXEs cannot be added modules

An .exe file that does not have an assembly was specified as an input file to Al.exe. Al.exe can only take .dll files without assemblies as input files.

al1043Manifest file name ‘name’ cannot be the same as any modules

The name specified with the /out option cannot be the same as any one of the file names that are specified as input to Al.exe.

al1044Error reading key file ‘file’ — reason

An error occurred while opening or reading from a file specified with /keyfile or the AssemblyKeyFileAttribute.

al1045Filename ‘file’ is too long or invalid

A file name longer than 260 characters was passed to Al.exe. Choose a file name with fewer characters or a shorter path, or rename the file.

al1046Resource identifier ‘ID’ has already been used in this assembly

Two resources, embedded or linked, have the same identifier or name (the second argument). Remove or rename one of the conflicting resources.

al1047Error importing file ‘file’ — reason

A module file cannot be opened for the specified reason.

al1048Error importing module ‘module’ of assembly ‘assembly’ — reason

An error occurred when opening a nonmanifest file of a multifile assembly. This error is not emitted directly by Al.exe, but can be passed programmatically to a process that uses Al.exe.

al1049Cannot auto-generate build and revision version numbers for dates before January 1, 2000

The system clock on your computer is set to a date earlier than January 1, 2000.

al1050The feature you are using ‘old feature’ is no longer supported; please use ‘new feature’ instead

A feature previously supported by Al.exe is now obsolete. Use the recommended feature instead.

al1051Error emitting ‘attribute’ attribute —’reason’

An assembly custom attribute was not processed by Al.exe for the specified reason.

al1052File ‘filename’ is not an assembly

The file specified with /template must contain assembly metadata. This error indicates that the file specified by /template did not contain an assembly.

al1053The version ‘version’ specified for the ‘option’ is not in the normal ‘major.minor.build.revision’ format

Al.exe detected ill-formed version information specified with the /fileversion or /productversion options.

al1054The version ‘version’ specified for the ‘option’ is not in the normal ‘major.minor.build.revision’ format

Al.exe detected ill-formed version information specified with the SatelliteContractVersionAttribute.

al1055Referenced assembly ‘filename’ does not have a strong name

This error is issued when you are building an assembly with a strong name and reference an assembly that does not have a strong name. To fix this, you must either regenerate your assembly with a strong name, or attach a strong name to the assembly by using sn.exe (see the documentation for sn.exe).

A common occurrence of this error is when you are using COM objects by way of wrapper assemblies, such as when you add a reference to a COM module to a C# project by way of the Visual Studio IDE. To avoid the error, you can specify the strong name key file for COM wrapper assemblies in the Project Property “Wrapper Assembly Key File/Name”

If you are creating the wrapper assembly through tlbimp.

If an assembly has a strong name, it can be installed in the global assembly cache. Consequently, referenced assemblies would also go into the global assembly cache. Only assemblies with strong names can go into the global assembly cache.

al1056Referenced assembly ‘filename’ is a localized satellite assembly

An assembly created by using the AssemblyCultureAttribute attribute was referenced in creating the current assembly. The AssemblyCultureAttribute attribute indicates the file is a localized satellite assembly and it is not appropriate to reference a satellite assembly. You should probably reference the main parent assembly instead.

al1057Executables cannot be localized, Culture should always be empty

An assembly is being created by using /target:exe but /culture was specified. Assemblies in the .exe cannot have information in the Culture field.

al1058‘file’ is an assembly and cannot be added as a module

In a C++ compilation, /assemblymodule (linker option) was passed a file that contained an assembly.

al1059Unknown error (code)

Al.exe received an unknown error code (code).

Possible solutions include the following:

  • Reinstall Visual Studio.
  • Reinstall the Windows SDK.
  • Check for missing files.
  • Check for adequate disk space.
  • Check for adequate memory.
  • Stop other processes that might be accessing the files.
  • Reboot your computer.
al1060Cryptographic failure while creating hashes — reason

An error occurred while creating the file hashes for a multifile assembly.

al1061Cannot set option ‘option’ because ‘reason’

The value specified for this option is invalid for the specified reason.

al1062Module ‘module’ was specified multiple times; it will only be included once

This warning is generated when the same source, input, or module file is specified multiple times on the command line. Make sure that you specify the file name only once.

al1063Public type ‘type’ is defined in multiple locations in this assembly: ‘file1′ and ‘file2′

The same type was found in more than one module in the assembly. Only one version of each type may be present in an assembly.

al1064Cannot specify multiple /bugreport options.

Only one /bugreport option is allowed.

al1065File name ‘File Name’ is too long or invalid

The specified file name is longer than the maximum allowed.

al1066Character ‘character’ is not allowed on the command-line or in response files

An invalid character was found, either on the command line or in a file.

al1067‘filename’ is a binary file instead of a text file

The file is in binary format instead of text.

al1068Module ‘ModuleName’ is already defined in this assembly. Each linked resource and module must have a unique file name.

The module occurs more than once in this assembly.

al1069Cannot create short file name ‘filename’ when a long file name with the same short file name already exists

The current file has a name that is the short version of a file name that already exists. For example, compiling LongFileName.cs and then recompiling with the name LongFi~1.cs will cause a compiler error similar to this. If the compiler output files that have long names were deleted, but the analogous linker files remained, this error might occur.

al1070Agnostic assembly cannot have a processor specific module ‘Module Name’

If you are building using /platform:agnostic (or you don’t specify /platform), an error will be generated if you try to add a module (using /addmodule) that is not agnostic. This is like trying to link an i386 obj file to an ia64 obj.

The main source of non-agnostic modules is C++. If you are using /addmodule with a C++ module, you may have to modify your build scripts to specify the appropriate /platform setting.

al1072Assembly and module ‘Module Name’ cannot target different processors

You cannot link an assembly and a module that are targeted for different processors, because the result has to run on a single processor.

al1073Referenced assembly ‘assembly’ targets a different processor

You cannot link assemblies that are targeted for different processors, because the result has to run on a single processor.

al1074Module name ‘Module Name’ stored in ‘File Name’ must match its file name

This is required of the linker. To resolve this problem, make the two names match.

al1075Delay signing was requested, but no key was given

When an assembly is delay signed, the compiler does not compute and store the signature, but reserves space in the file so the signature can be added later.

For example, using /delaysign + enables a tester to put the assembly in the global cache. After testing, you can fully sign the assembly by adding the private key to the assembly by using the Assembly Linker utility.

al1076Type ‘type’ is forwarded to multiple assemblies: ‘assembly’ and ‘assembly’.

A type can only be forwarded to one assembly.

al1077Public type ‘type’ is defined in ‘assembly’ and forwarded to ‘assembly’.

There is a duplicate public type in the assembly being generated. One is a valid type definition and the other is a type forwarder.

Linker Tools Error LNK2019

  • Article
  • 9 minutes to read

unresolved external symbol 'symbol' referenced in function 'function'

The compiled code for function makes a reference or call to symbol, but the linker can't find the symbol definition in any of the libraries or object files to link.

This error message is followed by fatal error LNK1120. To fix error LNK1120, you must fix all LNK2001 and LNK2019 errors first.

Possible causes

There are many ways to get this error. All of them involve a reference to a function or variable that the linker couldn't resolve, or find a definition for. The compiler can identify when a symbol isn't declared, but it can't tell when the symbol isn't defined. That's because the definition may be in a different source file or library. If a symbol is referred to but never defined, the linker generates an unresolved external symbol error.

Here are some common problems that cause LNK2019:

The source file that contains the definition of the symbol isn't compiled

In Visual Studio, make sure the source file that defines the symbol gets compiled as part of your project. Check the intermediate build output directory for a matching .obj file. If the source file isn't compiled, right-click on the file in Solution Explorer and choose Properties to check the properties of the file. The Configuration Properties > General page should show an Item Type of C/C++ Compiler. On the command line, make sure the source file that contains the definition is compiled.

The object file or library that contains the definition of the symbol isn't linked

In Visual Studio, make sure the object file or library that contains the symbol definition is linked as part of your project. On the command line, make sure the list of files to link includes the object file or library.

The declaration of the symbol isn't spelled the same as the definition of the symbol

Verify you use the correct spelling and capitalization in both the declaration and the definition, and wherever the symbol is used or called.

A function is used but the type or number of the parameters don't match the function definition

The function declaration must match the definition. Make sure the function call matches the declaration, and that the declaration matches the definition. Code that invokes template functions must also have matching template function declarations that include the same template parameters as the definition. For an example of a template declaration mismatch, see sample LNK2019e.cpp in the Examples section.

A function or variable is declared but not defined

LNK2019 can occur when a declaration exists in a header file, but no matching definition is implemented. For member functions or static data members, the implementation must include the class scope selector. For an example, see Missing Function Body or Variable.

The calling convention is different between the function declaration and the function definition

Calling conventions (__cdecl, __stdcall, __fastcall, or __vectorcall) are encoded as part of the decorated name. Make sure the calling convention is the same.

A symbol is defined in a C file, but declared without using extern "C" in a C++ file

Symbols defined in a file that is compiled as C have different decorated names than symbols declared in a C++ file unless you use an extern "C" modifier. Make sure the declaration matches the compilation linkage for each symbol. Similarly, if you define a symbol in a C++ file that will be used by a C program, use in the definition.

A symbol is defined as static and then later referenced outside the file

In C++, unlike C, global constants have linkage. To get around this limitation, you can include the initializations in a header file and include that header in your .cpp files, or you can make the variable non-constant and use a constant reference to access it.

A static member of a class isn't defined

A static class member must have a unique definition, or it will violate the one-definition rule. A static class member that can't be defined inline must be defined in one source file by using its fully qualified name. If it isn't defined at all, the linker generates LNK2019.

A build dependency is only defined as a project dependency in the solution

In earlier versions of Visual Studio, this level of dependency was sufficient. However, starting with Visual Studio 2010, Visual Studio requires a project-to-project reference. If your project doesn't have a project-to-project reference, you may receive this linker error. Add a project-to-project reference to fix it.

An entry point isn't defined

The application code must define an appropriate entry point: or for console applications, and or for Windows applications. For more information, see main function and command-line arguments or WinMain function. To use a custom entry point, specify the /ENTRY (Entry-Point Symbol) linker option.

You build a console application by using settings for a Windows application

If the error message is similar to unresolved external symbol WinMain referenced in functionfunction_name, link by using /SUBSYSTEM:CONSOLE instead of /SUBSYSTEM:WINDOWS. For more information about this setting, and for instructions on how to set this property in Visual Studio, see /SUBSYSTEM (Specify Subsystem).

You attempt to link 64-bit libraries to 32-bit code, or 32-bit libraries to 64-bit code

Libraries and object files linked to your code must be compiled for the same architecture as your code. Make sure the libraries your project references are compiled for the same architecture as your project. Make sure the /LIBPATH or Additional Library Directories property points to libraries built for the correct architecture.

You use different compiler options for function inlining in different source files

Using inlined functions defined in .cpp files and mixing function inlining compiler options in different source files can cause LNK2019. For more information, see Function Inlining Problems.

Automatic (function scope) variables can only be used in the scope of that function. These variables can't be declared and used in other source files. For an example, see Automatic (Function Scope) Variables.

You call intrinsic functions or pass argument types to intrinsic functions that aren't supported on your target architecture

For example, if you use an AVX2 intrinsic, but don't specify the /ARCH:AVX2 compiler option, the compiler assumes that the intrinsic is an external function. Instead of generating an inline instruction, the compiler generates a call to an external symbol with the same name as the intrinsic. When the linker tries to find the definition of this missing function, it generates LNK2019. Make sure you only use intrinsics and types supported by your target architecture.

You mix code that uses native wchar_t with code that doesn't

C++ language conformance work that was done in Visual Studio 2005 made a native type by default. If not all files have been compiled by using the same /Zc:wchar_t settings, type references may not resolve to compatible types. Make sure types in all library and object files are compatible. Either update from a typedef, or use consistent /Zc:wchar_t settings when you compile.

Third-party library issues and vcpkg

If you see this error when you're trying to configure a third-party library as part of your build, consider using vcpkg, a C++ package manager, to install and build the library. vcpkg supports a large and growing list of third-party libraries. It sets all the configuration properties and dependencies required for successful builds as part of your project.

Diagnosis tools

Sometimes it's difficult to tell why the linker can't find a particular symbol definition. Often the problem is that you haven't included the code that contains the definition in your build. Or, build options have created different decorated names for external symbols. There are several tools and options that can help you diagnose LNK2019 errors.

  • The /VERBOSE linker option can help you determine which files the linker references. This option can help you verify whether the file that contains the definition of the symbol is included in your build.

  • The /EXPORTS and /SYMBOLS options of the DUMPBIN utility can help you discover which symbols are defined in your .dll and object or library files. Make sure the exported decorated names match the decorated names the linker searches for.

  • The UNDNAME utility can show you the equivalent undecorated external symbol for a decorated name.

Examples

Here are several examples of code that causes a LNK2019 error, together with information about how to fix the error.

A symbol is declared but not defined

In this example, an external variable is declared but not defined:

Here is another example where a variable and function are declared as but no definition is provided:

Unless and are defined in one of the files included in the build, the linker generates LNK2019. You can fix the errors by including the source code file that contains the definitions as part of the compilation. Alternatively, you can pass .obj files or .lib files that contain the definitions to the linker.

A static data member is declared but not defined

LNK2019 can also occur when a static data member is declared but not defined. The following sample generates LNK2019, and shows how to fix it.

Declaration parameters don't match the definition

Code that invokes template functions must have matching template function declarations. Declarations must include the same template parameters as the definition. The following sample generates LNK2019 on a user-defined operator, and shows how to fix it.

Inconsistent wchar_t type definitions

This sample creates a DLL that has an export that uses , which resolves to .

The next sample uses the DLL in the previous sample, and generates LNK2019 because the types and aren't the same.

To fix this error, change to or , or compile LNK2019g.cpp by using /Zc:wchar_t-.

Additional resources

For more information about possible causes and solutions for LNK2001, see the Stack Overflow question What is an undefined reference/unresolved external symbol error and how do I fix it?.

Absolutely: Linker fatal error expected a file name

Linker fatal error expected a file name
POP3D AUTHENTICATION ERROR INPUT/OUTPUT ERROR
Linker fatal error expected a file name

Contact US

INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Thanks. We have received your request and will respond promptly.

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Us!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Tek-Tips Posting Policies

Contact US

Fatal Linker Error, Expected a file name

Fatal Linker Error, Expected a file name

bwszeg(Programmer)

(OP)

Hi,

I'm new to using C++ Builder 6.0. When I create a blank project  (Application) and save all the components by their default name, compiling works.

However, when I save anything of the linker fatal error expected a file name under a different directory I get the "Fatal Linker Error, Expected a file name" message.

I use the save project option in the file menu.

Any help is greatly appreciated

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Linker Tools Error LNK2001

  • Article
  • 10 minutes to read

unresolved external symbol "symbol"

The compiled code makes a reference or call to symbol. The symbol isn't defined in any libraries or object files searched by the linker.

This error message is followed by fatal error LNK1120. To fix error LNK1120, first fix all LNK2001 and LNK2019 errors.

There are many ways to get LNK2001 errors. All of them involve a reference to a function or variable that the linker can't resolve, or find a definition for. The compiler can identify when your code doesn't declare a symbol, but not when it doesn't define one. That's because the definition may be in a different source file or library. If your code refers to a symbol, but it's never defined, the linker generates an error.

What is an unresolved external symbol?

A symbol is the internal name for a function or global variable. It's the form of the name used or defined in a compiled object file or library. A global variable is defined in the object file where storage is allocated for it. A function is defined in the object file where the compiled code for the function body is placed. An external symbol is one referenced in one object file, but defined in a different library or object file. An exported symbol is one that's made publicly available by the object file or library that defines it.

To create an application or DLL, every symbol used must have a definition. The linker must resolve, or find the matching definition for, every external symbol referenced by each object file. The linker generates an error when it can't resolve an external symbol. It means the linker couldn't find a matching exported symbol definition in any of the linked files.

Compilation and link issues

This error can occur:

  • When the project is missing a reference to a library (.LIB) or object (.OBJ) file. To fix this issue, add a reference to the required library or object file to your project. For more information, see lib Files as linker input.

  • When the project has a reference to a library (.LIB) or object (.OBJ) file that in turn requires symbols from another library. It may happen even if you don't call functions that cause the dependency. To fix this issue, add a reference to the other library to your project. For more information, see Understanding the classical model for linking: Taking symbols along for the ride.

  • If you use the /NODEFAULTLIB or /Zl options. When you specify these options, libraries that contain required code aren't linked into the project unless you've explicitly included them. To fix this issue, explicitly include all the libraries you use on the link command line. If you see many missing CRT or Standard Library function names when you use these options, explicitly include the CRT error 1772 rpc Standard Library DLLs or library files in the link.

  • If you compile using the /clr option. There may be a missing reference to. For more information on how to fix this issue, see Initialization of mixed assemblies.

  • If you link to the release mode libraries when building a debug version of an application. Similarly, if you use options /MTd or /MDd or define and then link to the release libraries, you should expect many potential unresolved externals, among other problems. Linking a release mode build with the debug libraries also causes similar problems. To fix this issue, make sure you use the debug libraries in your debug builds, and retail libraries in your retail builds.

  • If your code refers to a symbol from one library version, but you link a different version of the library. Generally, you can't mix object files or libraries that are built for different versions of the compiler. The libraries that ship in one version may contain symbols that can't be found in the libraries included with other versions. To script host error this issue, build all the object files and libraries with the same version of the compiler before linking them together. For more information, see C++ binary compatibility between Visual Studio versions.

  • If library paths are out of date. The Tools > Options > Projects > VC++ Directories dialog, under the Library files selection, allows you to change the library search order. The Linker folder in the project's Property Pages dialog box may also contain paths that could be out of date.

  • When a new Windows SDK is installed (perhaps to a different location), linker fatal error expected a file name. The library search order must be updated to point to the new location. Normally, you should put the path to new SDK include and lib directories in front of the default Visual C++ location. Also, a project containing embedded paths may still point to old paths that are valid, but out of date. Update the paths for new functionality added by the new version that's installed to a different location.

  • If you build at the command line, and have created your own environment variables. Verify that the paths to tools, libraries, and header files go to a consistent version. For more information, see Use the MSVC toolset from the command line.

Coding issues

This error can be caused by:

  • Mismatched case in your source code or module-definition (.def) file. For example, if you name a variable in one C++ source file and try to access it as in another, this error is generated. To fix this issue, use consistently spelled and cased names.

  • A project that uses function inlining. It can occur when you define the functions as in a source file, rather than in a header file. Inlined functions can't be seen outside the source file that defines them. To fix this issue, define the inlined functions in a disc read error occurred laptop headers where they're declared.

  • Calling a C function from a C++ program without using an declaration for the C function. The compiler uses different internal symbol naming conventions for C and C++ code. The internal symbol name is what the linker looks for when resolving symbols, linker fatal error expected a file name. To fix this issue, use an wrapper around all declarations of C functions used in your C++ code, which causes the compiler to use the C internal naming convention for those symbols. Compiler options /Tp and /Tc cause the compiler to compile files as C++ or C, respectively, no matter what the filename extension is. These options can cause internal function names different from what you expect.

  • An attempt to reference functions or data that don't have external linkage. In C++, inline functions and data have internal linkage unless explicitly specified as. To fix this issue, use explicit declarations on symbols referred to outside the defining source file.

  • A missing function body or variable definition. This error is common when you declare, but don't define, variables, functions, or classes in your code. The compiler only needs a function prototype or variable declaration to generate an object file without error, but the linker can't resolve a call to the function or a reference to the variable because there's no function code or variable space reserved. To fix this issue, make sure to define every referenced function and variable in a source file or library you link.

  • A function call that uses return and parameter types or calling conventions that don't match the ones in the function definition. In C++ object files, linker fatal error expected a file name, Name decoration encodes the calling convention, class or namespace scope, linker fatal error expected a file name, and return and parameter types of a function. The encoded string becomes part of the final decorated function name. This name is used by the linker to resolve, or match, calls to the function from other object files. To fix this issue, make sure the function declaration, definition, and calls all use the same scopes, types, and calling conventions.

  • C++ code you call, when you include a function prototype in a class definition, but don't include the implementation of the function. To fix this issue, be sure to provide a definition for all class members you call.

  • An attempt to call a pure virtual function from an abstract base class. A pure virtual function has no base class implementation. To fix this issue, make sure all called virtual functions are implemented.

  • Trying to use a variable declared within a function (a local variable) outside the scope of that function. To fix this issue, remove the reference to the variable that isn't in scope, or move the variable to a higher scope.

  • When you build a Release version of an ATL project, producing a message that CRT startup code is required. To fix this issue, do one of the following,

    • Remove from the list of preprocessor defines to allow CRT startup code to be included. For more information, see General property page (Project).

    • If possible, remove calls to CRT functions that require CRT startup code. Instead, use their Win32 equivalents. For example, use instead of. Known functions that require CRT startup code are some of the string and floating point functions.

Consistency issues

There's currently no standard for C++ name decoration between compiler vendors, or even between different versions of the same compiler. Object files compiled with different compilers may not use the same naming scheme. Linking them can cause error LNK2001.

Mixing inline and non-inline compile options on different modules can cause LNK2001. If a C++ library is created with function inlining turned on (/Ob1 or /Ob2) but the corresponding header file describing the functions has inlining turned off (no keyword), this error occurs. To fix this issue, define the functions in the header file you include in other source files.

If you use the compiler directive, make sure you've set a value of 2 or greater, and make sure you also use the /Ob1 or /Ob2 compiler option.

This error can occur if you omit the LINK option /NOENTRY when you create a resource-only DLL. To fix this issue, add the /NOENTRY option to the link command.

This error can occur if you use incorrect /SUBSYSTEM or /ENTRY settings in your project. For example, if you write a console application and specify /SUBSYSTEM:WINDOWS, an unresolved external on error vba access 2007 is generated for. To fix this issue, make sure you match the options to the project type. For more information on these options and entry points, see the /SUBSYSTEM and /ENTRY linker options.

Exported .def file symbol issues

This error occurs when an export listed in a .def file isn't found. It could be because the export doesn't exist, is spelled incorrectly, or uses C++ decorated names. A .def file doesn't take decorated names. To fix this issue, remove unneeded exports, and use declarations for exported symbols.

Use the decorated name to find the error

The C++ compiler and linker use Name Decoration, also known as name-mangling. Name decoration encodes extra information about the type of a variable in its symbol name. The symbol name for a function encodes its return type, parameter types, scope, and calling convention. This decorated name is the symbol name the linker searches for to resolve external symbols.

A link error can result if the declaration of a function or variable doesn't exactly match the definition of the function or variable. That's because any difference becomes part of the symbol name to match. The error can happen even if the same header file is used in both the calling code and the defining code. One way it may occur is if you compile the source files by using different compiler flags. For example, if your code is compiled to use the calling convention, but you link to a library that expects clients to call it using the default or calling convention. In this case, the symbols don't match because the calling conventions are different.

To help you find the cause, the error message shows you two versions of the name. It displays both the "friendly name," the name used in source code, and the decorated name (in parentheses). You don't need to know how to interpret the decorated name. You can still search for and compare it with other decorated names. Command-line tools can help to find and compare the expected symbol name and the actual symbol name:

  • The /EXPORTS and /SYMBOLS options of the DUMPBIN command-line tool are useful here. They can help you discover which symbols are defined in your .dll and object or library files. You can use the symbols list to verify that the exported decorated names match the decorated names the linker searches for.

  • In some cases, the linker can only report the decorated name for a symbol. You can use the UNDNAME command-line tool to get the undecorated form of a decorated name.

Additional resources

For more information, see the Stack Overflow question "What is an undefined reference/unresolved external symbol error and how do I fix it?".

( C++) Expected a error creating direct3d 9 graphical engine name

Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

 

Link error.

 

IDE: C++ Builder 6.0

Project type: VCL

 

 

 

 

 

Full error message

 

 

 

 

 

 

Cause

 

This error occurs when you save your project in a folder with a 'strange' name, clearcommerror builder c++. 'C:\C++'.

 

 

 

 

 

Solution

 

Your current program has become useless, so cut out all code and paste it in, for example, Notepad. Then do the following: 'Close All', linker fatal error expected a file name, start a new application, paste your code correctly, linker fatal error expected a file name All' in a 'normally' named folder, for example 'C', 'Cpp', 'CPlusPlus', 'Programming'.

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

Board index » cppbuilder » [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 source fatal error as libraries and header files used and
not in the path to the project.
. Ed

Quote
oLiVeS wrote in message
news: [email protected] .
>If you are on Win98 then there are issues related to Win98
>and not to linker fatal error expected a file name compiler which cause it to occasionally not
>find ilink32.cfg and therefore not get the proper linker
>configuration, linker fatal error expected a file name. 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 linker fatal error expected a file name copy of the ilink32.cfg
in my project folder, but that did not solve the problem.
 

How Can I Solve " [linker fatal error]Fatal:Expected a Filename "

Amir Ahmadzadeh's profile photo

Amir Ahmadzadeh

unread,
Sep 22, 2003, 12:42:54 PM9/22/03

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

How Can I Solve " [linker fatal error]Fatal:Expected a Filename " in
C++Builder6 ?
Thanx .
Michel Leunen's profile photo

Michel Leunen

unread,
Sep 22, 2003, 5:59:08 PM9/22/03

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Amir Ahmadzadeh wrote:
> How Can I Solve " [linker fatal error]Fatal:Expected a Filename " in
> C++Builder6 ?

You probably have an illegal character in your path. Did you have a
directory called C++? BCB doesn't like having such kind of characters.

Michel
--
----------------------------------------
Michel Leunen
mailto:[email protected]
http://www.leunen.com/cbuilder/
----------------------------------------

Harold Howe [TeamB]'s profile photo

Harold Howe [TeamB]

unread,
Sep 23, 2003, 5:11:55 AM9/23/03

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Amir Ahmadzadeh wrote:

> How Can I Solve " [linker fatal error]Fatal:Expected a Filename " in
> C++Builder6 ?

Try setting ShowCommandLine to true. It is under
HKCU\Software\Borland\C++Builder\6.0\Compiling

It won't solve the problem, linker fatal error expected a file name, but it might help debug what is being passed
to the linker.

h^2

Jonathan West's profile photo

Jonathan West

unread,
Nov 13, 2003, 2:04:40 AM11/13/03

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

I have pulled my hair for quite a while on this one before I found this
message. Thanks for the answer.

While extracting .NET resources from Alchemy Catalyst, an error is reported in the Result pane:

ALINK: error 1026: The version specified 'xxxxxx' is invalid.

This error is due to over translation. The Assembly Version found in the Version resource of the .NET assembly should not be translated/modified. See the example below in which the Version resource of GoogleMT.dll assembly has been pseudo translated and the error is reported on extraction.

Revert the translation and lock string so it cannot be translated by mistake.

ErrorDescriptional1001Internal compiler error

Try to determine whether Al.exe is failing because of its inability to parse unexpected syntax. Then, contact Microsoft Product Support Services.

al1002Out of memory

Al.exe ran out of memory and stopped, linker fatal error expected a file name. Increase the amount of available memory.

al1003Compiler option ‘option’ must be followed by an argument

Al.exe expected an argument to be passed to a command-line option. For example, if you specify /algid:, you must pass an algorithm identifier.

al1004Unexpected common language runtime initialization error — ‘reason’

Al.exe reported an error with the installation of Visual Studio or the common language runtime for the specified reason.

al1005File ‘file’ too big to open

All files opened by Al.exe must be smaller than 4 gigabytes (GB).

al1006Response file ‘file’ slax boot error already included

The same response file was specified (@file) more than once on the command line. The response file can only be included once.

al1007Error opening response file ‘file’ — ‘reason’

Al.exe cannot open the specified response file for the specified reason.

al1008Missing file specification for ‘option’ command-line option

Al.exe expected a file to be passed to a command-line option. For example, if you specify the /out option, you must specify a file.

al1009Can’t open ‘file’ for writing

Al.exe was unable to write to a file, such as the output assembly file. The disk might be full, linker fatal error expected a file name, the file might be read-only, or you might not have permissions to the file.

al1010Command-line syntax error: Missing ‘:text’ for ‘option’ option

Al.exe expected an argument to be passed to a command-line option. For example, if you specify the /title option, you must pass a string.

al1011File ‘file’ is an executable file and cannot be opened as a text file

A binary file was specified where a text file was expected. For example, this error occurs if a binary file is passed on the command line as a response file.

al1012‘value’ is not a valid setting for option ‘option’

An unexpected value was passed to a command-line option. For example, this error occurs if you specify an invalid value to the /target option.

al1013Unrecognized command-line option: ‘option’

An invalid command-line option was specified.

al1014Unexpected initialization error — ‘reason’

Al.exe detected a COM initialization failure. This might be caused by a lack of memory, but a more likely cause is the system DLL files. You should see a similar error if you run any Automation-aware or COM-aware program, such as Microsoft Visual Studio.

Reinstall the operating system.

al1015Unable to find messages file ‘alinkui.dll’ linker fatal error expected a file name requires Alinkui.dll. Make sure that this file is on your path. If necessary, copy it from the product CD.

al1016No valid input files were specified

Al.exe requires one or more input files that do not have assembly information.

al1017No target file name was specified

The required /out option specifying the target file name was missing.

al1018Required file ‘file’ could not be loaded

Certain DLL files cannot be loaded, linker fatal error expected a file name. Reinstall Visual Studio or the Windows Software Development Kit (SDK).

al1019Metadata failure while creating assembly — reason

Generation of the assembly was interrupted for the specified reason. For example, this error occurs if a file that you specify with the /win32res option is not found.

al1020Ignoring included assembly ‘file’

An input file that contained an assembly was specified. Al.exe input files cannot contain assemblies.

al1021‘setting’ : overriding previous setting

A module had a value for a particular setting, possibly assigned through custom attributes, which was overridden with a value passed using an Al.exe command-line option.

al1022Error reading embedded resource ‘file’ — reason

Al.exe cannot read the file passed to the /embedresource option for the specified reason.

al1023Error embedding resource ‘file’ — reason

The operating system cannot embed the resource file in the assembly for the specified reason.

al1025ComType record ‘record’ points to an invalid file record ‘record’

Metadata in the input module is invalid. The tool linker fatal error expected a file name produced the module must be fixed.

al1026The version specified ‘version’ is invalid

See information about the /version option for valid formats.

al1028Key file ‘file’ is missing the private key needed for signing

A key file that contains only the public key was passed to the /keyfile option. Use the Strong Name Tool (Sn.exe) to generate a file that has both a public and private key, as shown in the following command.

sn -k keypair.snk. al1029The key container name ‘container’ does not exist

The value passed to the /keyname option is not a valid container. Use the Strong Name Tool (Sn.exe) to create a container.

al1030The cryptographic service is not installed properly or does not have a suitable key provider

You might have to either reinstall the operating system or install some cryptographic utility that was that is used to create the key.

al1031Error reading icon ‘file’ — reason

Al.exe cannot read the file that was passed to the /win32icon option for the specified reason

al1032Error generating resources for ‘file’ — reason

Al.exe cannot create a file because of insufficient disk space or some other error. This error occurs when you specify the /win32icon option (which generates an .ico file) or do not specify the /win32res option (which generates a file that has resource information).

If you cannot resolve the file generation problem, use /win32res, which specifies a file that can contain version or bitmap (icon) information.

al1033Assembly custom attribute ‘attribute’ was specified multiple times with different values

Different values were passed to two occurrences of the same custom attribute in source modules that are specified as input to Al.exe.

al1034Assembly ‘file’ cannot be copied or renamed

While using the Al.exe syntax that enables you to both specify an input file and copy it, a name conflict arose that stopped the compiler. For example, this error occurs if you specify input.dll,somename.dll /out:somename.dll.

al1035Libraries cannot have an entry point

You cannot specify both the /target:lib option (the default) and the /main option.

al1036Entry point required for executable applications

When using the /target:exe or /target:win option, you must also specify the /main option.

al1037Unable to find the entry point method ‘main’

Al.exe cannot find a Main method at the location specified by the /main option.

al1039Initialization of global assembly cache manager failed — reason

Reinstall Visual Studio or the Windows SDK.

al1040Failed to install assembly into cache — reason

Only signed assemblies can gcc make fatal errors encountered - cannot installed into the cache.

al1041‘method’: cannot be the entry point because the signature or visibility is incorrect, or it is generic

A method was specified with the /main option, linker fatal error expected a file name, but that method is not static, does not return int or void, was generic, or has invalid arguments.

al1042‘exe’: EXEs cannot be added modules

An .exe file that does not have an assembly was linker fatal error expected a file name as an input file to Al.exe. Al.exe can only take .dll files without assemblies as input files.

al1043Manifest file name ‘name’ cannot be the same as any modules

The name specified with the /out option cannot be the same as any one of the file linker fatal error expected a file name that are specified as input to Al.exe.

al1044Error reading key file ‘file’ — reason

An error occurred while opening or reading from a file specified with /keyfile or the AssemblyKeyFileAttribute.

al1045Filename ‘file’ is too long or invalid

A file name longer than 260 characters was passed to Al.exe. Choose a file name with fewer characters or a shorter path, or rename the file.

al1046Resource identifier ‘ID’ has already been used in this assembly

Two resources, embedded or linked, have the same identifier or name (the second argument). Remove or rename sql query error checker of the conflicting resources.

al1047Error importing file ‘file’ — reason

A module file cannot be opened for the specified reason.

al1048Error importing module ‘module’ of assembly ‘assembly’ — reason

An error occurred when opening a nonmanifest file of a multifile assembly. This error is not emitted directly by Al.exe, but can be passed programmatically to a process that uses Al.exe.

al1049Cannot auto-generate build and revision version numbers for dates before January 1, 2000

The system clock on your computer is set to a date earlier than January 1, 2000.

al1050The feature you are using ‘old feature’ is no longer supported; please use ‘new feature’ instead

A feature previously supported by Al.exe is now obsolete. Use the recommended feature instead.

al1051Error emitting ‘attribute’ attribute —’reason’

An assembly custom attribute was not processed by Al.exe for the specified reason.

al1052File ‘filename’ is not an assembly

The file specified with /template must contain assembly metadata. This error indicates that the file specified by /template did not contain an assembly.

al1053The version ‘version’ specified for the ‘option’ is not in the normal ‘major.minor.build.revision’ format

Al.exe detected ill-formed version information specified with the /fileversion or /productversion options.

al1054The version ‘version’ specified for the ‘option’ is not in the normal ‘major.minor.build.revision’ format

Al.exe detected ill-formed version information specified with the SatelliteContractVersionAttribute.

al1055Referenced assembly ‘filename’ does not have a strong name

This error is issued when you are building an assembly with a strong name and reference an assembly that does not have a strong name. To fix this, you must either regenerate your assembly with a strong name, or attach a strong name to the assembly by using sn.exe (see the documentation for sn.exe).

A common occurrence of this error is when linker fatal error expected a file name are using COM objects by way of wrapper assemblies, linker fatal error expected a file name, such as when you add a reference to a COM module to a C# project by way of the Visual Studio IDE. To avoid the error, you can specify the strong name key file for COM wrapper assemblies in the Project Property “Wrapper Assembly Key File/Name”

If you are creating the wrapper assembly through tlbimp.

If an assembly has a strong name, it can be installed in the global assembly cache. Consequently, referenced assemblies would also go into the global assembly cache. Only assemblies with strong names can go into the global assembly cache.

al1056Referenced assembly ‘filename’ is a localized satellite assembly

An assembly created by using the AssemblyCultureAttribute attribute was referenced in creating the current assembly. The AssemblyCultureAttribute attribute indicates the file is a localized satellite assembly and it is not appropriate to reference a satellite assembly. You should probably reference the main parent assembly instead.

al1057Executables cannot be localized, Culture should always be empty

An assembly is being created by using /target:exe but /culture was specified. Assemblies in the .exe cannot have information in the Culture field.

al1058‘file’ is an assembly and cannot be added as a module

In a C++ compilation, /assemblymodule (linker option) was passed a file that contained an assembly.

al1059Unknown error (code)

Al.exe received an unknown error code (code).

Possible solutions include the following:

  • Reinstall Visual Studio.
  • Reinstall the Windows SDK.
  • Check for missing files.
  • Check for adequate disk space.
  • Check for adequate memory.
  • Stop other processes that might be accessing the files.
  • Reboot your computer.
al1060Cryptographic failure while creating hashes — reason

An error occurred while creating the file hashes for a multifile assembly.

al1061Cannot set option ‘option’ because ‘reason’

The value specified for this option is invalid for the specified reason.

al1062Module ‘module’ was specified multiple times; it will only be included once

This warning is generated when the same source, input, linker fatal error expected a file name, or module file is specified multiple times on the command line. Linker fatal error expected a file name sure that you specify the file name only once.

al1063Public type ‘type’ is defined in multiple locations in this assembly: ‘file1′ and ‘file2′

The same type was found in more than one module in the assembly, linker fatal error expected a file name. Only one version of each type may be present in an assembly.

al1064Cannot specify multiple /bugreport options.

Only one /bugreport option is allowed.

al1065File name ‘File Name’ is too long or invalid

The specified file name is longer than the maximum allowed.

al1066Character ‘character’ is not allowed on the command-line or in response files

An invalid character was found, either on the command line or in a file.

al1067‘filename’ is a binary file instead of a text file

The file is in binary format instead of text.

al1068Module ‘ModuleName’ is already defined in this assembly. Each linked resource and module must have a unique file name.

The module occurs more than once in this assembly.

al1069Cannot create short file name ‘filename’ when a long file name with the same short file name already exists

The current file has a name that is miranda icq error 1406 short version of a file name that already exists. For example, compiling LongFileName.cs and then recompiling with the name LongFi~1.cs will cause a compiler error similar to this. If the compiler output files that have long names were deleted, but the analogous linker files remained, this error might occur.

al1070Agnostic assembly cannot have a processor specific module ‘Module Name’

If you are building using /platform:agnostic (or you don’t specify /platform), an error will be generated if you try to add a module (using /addmodule) that is not agnostic. This is like trying to link an i386 obj file to an ia64 obj.

The main source of non-agnostic modules is C++. If you are using /addmodule with a C++ module, you may have to modify your build scripts to specify the appropriate /platform setting.

al1072Assembly and module ‘Module Name’ cannot target different processors

You cannot link an assembly and a module that are targeted for different processors, because the result has to run on a single processor.

al1073Referenced assembly ‘assembly’ targets a different processor

You cannot link assemblies that are targeted for different processors, because the result has to run on a single processor.

al1074Module name ‘Module Name’ stored in ‘File Name’ must match its file name

This is required of the linker. To resolve this problem, make the two names match.

al1075Delay signing was requested, but no key was given

When an assembly is delay signed, the compiler does not compute and store the signature, but reserves space in the file so the signature can be added later.

For example, using /delaysign + enables a tester to put the assembly in the global cache. After testing, you can fully sign the assembly by adding the private key to the assembly by using the Assembly Linker utility.

al1076Type ‘type’ is forwarded to multiple assemblies: ‘assembly’ and ‘assembly’.

A type can only be forwarded to one assembly.

al1077Public type ‘type’ is defined in ‘assembly’ and forwarded to ‘assembly’.

There is a duplicate public type in the assembly being generated. One is a valid type definition and the other is a type forwarder.

linker fatal error expected a file name

0 Comments

Leave a Comment