Connecting Tech Pros Worldwide Forums | Help | Site Map

Link Error within C++ Builder

Newbie
 
Join Date: Jul 2007
Posts: 4
#1: Jul 9 '07
Hi!

I got the link error problem (shown as bellow) when I complied my project.

[Linker Error] Fatal: Expected a file name:

Then I searched from google and followed the suggestion to update the ilinker32.exe and ilinker32.dll. The link problem was still there but in the different type:

[Linker Error] Fatal: Access violation. Link terminated.

Then I tried to open a new project by adding all the .cpp, .h and .lib file to the new project and built. The same linker error message showed up.

Then I tried to rebuild an old version of the project which can be sucessfully built previously to see whether this problem was due to my C++ Builder or the project. It was built without any error.

Then I tried to copy this old version of project to another directory and rebuilt. The same linker error message showed up.

I really don't know what's wrong with it. Any suggestion will be great apreciated.

Newbie
 
Join Date: Jul 2007
Posts: 4
#2: Jul 9 '07

re: Link Error within C++ Builder


Quote:

Originally Posted by ivy146

Hi!

I got the link error problem (shown as bellow) when I complied my project.

[Linker Error] Fatal: Expected a file name:

Then I searched from google and followed the suggestion to update the ilinker32.exe and ilinker32.dll. The link problem was still there but in the different type:

[Linker Error] Fatal: Access violation. Link terminated.

Then I tried to open a new project by adding all the .cpp, .h and .lib file to the new project and built. The same linker error message showed up.

Then I tried to rebuild an old version of the project which can be sucessfully built previously to see whether this problem was due to my C++ Builder or the project. It was built without any error.

Then I tried to copy this old version of project to another directory and rebuilt. The same linker error message showed up.

I really don't know what's wrong with it. Any suggestion will be great apreciated.

Is there anybody pass by? I do need help. Please give any suggestion that may help. Many thanks.
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,382
#3: Jul 9 '07

re: Link Error within C++ Builder


Sorry, but I use only Visual Studio.NET.

What type of project have you created?

Did you write the makefile or did the tool generate it?? If the tool generates it, there should not be a problem.

If a library is missing, you need to add the library to the list of additional dependencies for the linker AND you need to specify the path to that library.

You will need to see how this is done in C++ Builder.
Newbie
 
Join Date: Jul 2007
Posts: 4
#4: Jul 10 '07

re: Link Error within C++ Builder


Quote:

Originally Posted by weaknessforcats

Sorry, but I use only Visual Studio.NET.

What type of project have you created?

Did you write the makefile or did the tool generate it?? If the tool generates it, there should not be a problem.

If a library is missing, you need to add the library to the list of additional dependencies for the linker AND you need to specify the path to that library.

You will need to see how this is done in C++ Builder.

Thanks for your kind help.

The project includes several forms and units. I think the C++Builder generates the makefile by itself. I have specified the path to the library. I have tried many things but none works.

Headach!
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,382
#5: Jul 10 '07

re: Link Error within C++ Builder


Quote:

Originally Posted by ivy146

The project includes several forms and units. I think the C++Builder generates the makefile by itself. I have specified the path to the library. I have tried many things but none works.

Specifying the path to the library maay not be enough. You may also need to add the name of the library to your project. Look in the area where you specify linker parameters and search for something like "linker input" or "linker dependencies". Almost certainly, you need to get that library name into the project.
Newbie
 
Join Date: Jul 2007
Posts: 4
#6: Jul 10 '07

re: Link Error within C++ Builder


Quote:

Originally Posted by weaknessforcats

Specifying the path to the library maay not be enough. You may also need to add the name of the library to your project. Look in the area where you specify linker parameters and search for something like "linker input" or "linker dependencies". Almost certainly, you need to get that library name into the project.

I followed your suggestion to look at the Project/ Option. But I couldn't find anything that related to "linker input" or "linker dependencies". I also checked the Project/Options difference between the old version which I can build and the current version which I cannot build. Everything is the same.

I don't think it is the problem with the project. It may caused by the different version of borland, cos my colleague used to work on it with C++ Builder 2007. He could build. If I still cannot solve this problem by tomorrow, I will update my borland to 2007.

Thank you very much for trying hard to help. I am very appreciated.
Reply