C++ Builder IDE >> How can I find out what is calling(requiring) a specific .obj file?

by Clint Clark » Thu, 04 Aug 2005 22:50:06 GMT

How can I find out what is calling(requiring) a specific .obj file?

I am getting and error
[Linker Error] 'C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\COMTHREAD.OBJ'
contains invalid OMF record, type 0x39

I swear that I am do not need that file anymore. How can I track down what
in my application is calling it?

Sorry about the cross post, I posted to the wrong group first.

Clint




C++ Builder IDE >> How can I find out what is calling(requiring) a specific .obj file?

by Ed Mulroy » Fri, 05 Aug 2005 00:33:18 GMT


I searched the libraries that came with BCB6 and could find nothing related
to an object file named comthread.obj

The only examples of the (case insensitive) letters in the word 'comthread '
that I can find are these two items from the Windows import library,
import32.lib. They should not cause a need to find comthread.obj

_CLSID_ComThreadEvents
_IID_IComThreadEvents

Some things to try:

Start by doing this:

Open a command window (some call it a DOS window)
Change to the project directory
Give this command
for %a in (*.obj) do echo tdump %a @%a.dmp >DoIt.bat
Open temp.bat in an editor (the IDE editor is ok for this) and
do a global search and replace to change the @ to >
Save the file.
Run the batch file with this command
DoIt
Run this command
grep -i "comthread" *.dmp

If grep finds any occurance of the word then the object file it found it in
is the offending file. Fix the source file that corresponds to that object
file.

If that does not find anything, try this:

- Select Project|Remove_from_project and removing anything
with the base file name of 'comthread'

- Close the IDE and with it closed, looking at the project file
(the *.bpr) file for the word 'comthread'. If you find it, delete
the whole file name.

- Delete all the *.obj, *.tds and *.il? files in the project (keep any
*.obj ones for which you do not have the source code)

Now start the IDE and see if it builds correctly.

If none of the above finds it then









C++ Builder IDE >> How can I find out what is calling(requiring) a specific .obj file?

by Clint Clark » Fri, 05 Aug 2005 04:44:50 GMT

Ok I tried running the first command that you gave me but I can not find a
temp.bat file anywhere. I do get a DoIt.bat file, but it only contains the
last .obj file that was reported. What am I missing here?

Just for your information the Comthread.obj was part of a package that I
used to use in a previous build of me application. Here is the strange part.
I just upgraded my workstation. everything was working fine on my old
workstation. I re-installed Builder6 on my new machine, and then just copied
all of the source files onto the new machine with the exact same path as the
old machine. My first problem was that I would get a could not find
VCLE35.lib error. So then I tried creating a project and adding all of my
forms and source files to the new project. Now I am trying to figure out
this problem.

I have been working on this Application since Builder3. That is when I wqas
using the Comthread package.

Clint










How can I find out what is calling(requiring) a specific .obj file?

by Ed Mulroy » Fri, 05 Aug 2005 05:29:36 GMT

ypo.

It was supposed to be >>Doit.bat not >Doit.bat
as in
for %a in (*.obj) do echo tdump %a @%a.dmp >>Doit.bat

After which you edit Doit.bat replacing '@' with '>' (because '>' cannot be
echoed to the file from the command line).

After the edited batch file is run there will be a set of new text files in
the directory, one per object file and each of the format
base_file_name.obj.dmp containing the information on the object file.

I'd edited the message changing the name to be Doit.bat instead of temp.bat
because after writing it I thought there was a chance you might already have
a temp.bat and if so the output would be appended to the existing file and
running it might then create havoc.

A vcle35.lib error suggests that you've not entered in the project but
merely converted it. The old library name was preserved through the
conversion but does not exist in the new version. As you say that you have
been using the product since version 3 it is amazing that you have missed
years of people on here saying to not convert a project to the new version
but rather to enter it anew.

. Ed

. path as the old machine. My first problem was that I would get a




How can I find out what is calling(requiring) a specific .obj file?

by Clint Clark » Fri, 05 Aug 2005 23:49:33 GMT

d

First I would like to say thank you very much for the pointers, and I
finally got everything working correctly again.

The funny thing is I have been working on this application off and on for
the last year using BCB6 on my old machine with no trouble. This VCLE35.lib
problem only started happening when I switched to my new machine. This just
seems very strange to me.

Anyway thank you for your help.

Clint


"Ed Mulroy" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...




How can I find out what is calling(requiring) a specific .obj file?

by Yu-Chen Hsueh » Sat, 06 Aug 2005 00:08:13 GMT

Clint,

I have not followed the entire thread, but if you're getting an error about
VCLE35.LIB being missing on the new machine, then it sounds like you may
have been using the old BCB3 pathes and therefore linking against the old
BCB3 libs on your old machine. Those libs (presumably) exist on the old
machine but not the new, hence the errors on the new one.

Creating a new project in BCB6 should get around this, alternatively you can
open the .BPR file in a text editor and update the lib references and pathes
yourself. For instance, VCLE35.LIB in BCB3 is now VCLE.LIB in BCB6.




Similar Threads

1. VERS.OBJ find file - HELP!