linker error

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

linker error

Postby david tran » Sat Feb 06, 2010 6:02 am

Hello,

I am recompling a project using Borland C++ Builder 6. The recompile process failed due to linker error. The message was:

"[Linker Fatal error] Fatal unable to open file ABCC.lib"

I removed all references of ABCC.lib in the project option and environment options, but the same error still occurred. I even tried manually removed ABCC.lib from the .bpr file, but the error just did not go away.

Also, anyone know what is the ABCC.lib?

Any help is appreciated.

Thanks in advance.

David.
david tran
 
Posts: 3
Joined: Sat Feb 06, 2010 5:04 am

Re: linker error

Postby Damon » Sat Feb 06, 2010 10:51 am

David,

Is there a
Code: Select all
#pragma link "ABCC"
or
Code: Select all
#pragma link "ABCC.lib"
somewhere in your code (perhaps in another included unit)? Do a Shift+Ctrl+F to search through all project files.

Best,
Damon
Damon Chandler
Editor-in-Chief
C++Builder Developer's Journal
http://bcbjournal.com
User avatar
Damon
BCBJ Editor and Admin
BCBJ Editor and Admin
 
Posts: 207
Joined: Wed May 26, 2004 11:25 pm
Location: Stillwater, OK, USA

Re: linker error

Postby relipse » Sat Feb 06, 2010 6:31 pm

For this reason I created a Borland C++Builder Project Cleaner to clean .bpk files and it should also clean .bpr files
It seems like everytime I go to open and compile a component, it adds a bunch of extra files to the link.

Use this prog to quickly clean them out -- useful if added to Tools -> section in bcb

http://tearsfornations.hostcell.net/fil ... leaner.zip

Jim
User avatar
relipse
Active Poster
Active Poster
 
Posts: 22
Joined: Sat Apr 11, 2009 3:16 pm

Re: linker error

Postby david tran » Wed Feb 10, 2010 6:03 am

Hello Jim,

Thanks for the tip. The linker error related to ABCC.lib has been resolved, however, when I rebuild the project after clean up the bpr file using the bpr file cleaner, another linker error came up:

[linker error] fatal: Unable to open file"LMDONEINSTANCE.OBJ"

I could not find this file my PC.

Any help is appreciated.

David.
david tran
 
Posts: 3
Joined: Sat Feb 06, 2010 5:04 am

Re: linker error

Postby arisme » Thu Feb 11, 2010 7:19 am

david tran wrote:...another linker error came up:
[linker error] fatal: Unable to open file"LMDONEINSTANCE.OBJ"

LMDOneInstance is probably a reference introduced on your computer by a component or software from LMD Innovations.
Similarly, ABCC.lib may have been a hangover from software or a component from ABC Software.

Only you know the history of what has happened on your computer previously. We can only speculate.

There is one definite way of confusing the compiler and linker and causing unpredictable behaviour, and that is to manually edit the IDE managed section of the project header files.

For example, if a component is dropped onto a form, the IDE will automatically insert a pointer statement into the unit header. If the component is subsequently deleted in design mode, the IDE will also automatically remove the previously inserted pointer statement - and also remove any other references that may have been automatically made elsewhere.

Manual editing of sections that are automatically maintained by C++Builder may leave orphaned references that can interfere with orderly compilation and linking.

I am not suggesting that this is what has happened in your case. It is an example of a possibility that could lead to the symptoms you are experiencing. There are other circumstances that could also produce similar results.

If all else fails, there is one way of getting out of a contaminated project. Start a new project entirely, add in any components, and finally copy your own code to the new units. Laborious, and a nuisance, but you will finish with a project that compiles and links correctly.

Aris
arisme
BCBJ Master
BCBJ Master
 
Posts: 357
Joined: Thu Jun 07, 2007 9:35 pm
Location: UK


Return to Technical

Who is online

Users browsing this forum: No registered users and 5 guests

cron