COFF to OMF import library conversion

Does anybody know if there is a utility that can convert Visual C++ .lib files (COFF) to Borland C++ (OMF)? If not, how could I go about writing a utility to do this?
Thanks in advance.
eppsmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ylCommented:
If you want to convert an import library you can create the OMF library directly from the DLL using Borland's implib utility.
0
nietodCommented:
If the library contains functions that are not declared extern "C" converting the library file won't do you much good anyway.  VC and BC use different schemes for name decorating so you won't be able call functions written in VC by BC.  If the functions are  declared extern "c" this is not a problem, however.  Your best bet is to recompile the source code under BC.
0
eppsmanAuthor Commented:
Sorry, but I already know that I can do that. The DLL I happen to be working with is KERNEL32.DLL. I am using the thunking functions in my Borland C++ program, but I am receiving linker errors. It seems that the entries in import32.lib for the QT_Thunk function aren't linking properly. I do have the thunk32.lib file from the Microsoft platform SDK, however. I know that I cannot link to this .lib directly, because it is a COFF lib file. If I could convert it, or if somebody could give me some pointers as to how I could write a conversion utility, it would be great. Or, if you have had a similar problem, perhaps you have a solution. Thank you.
0
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

ylCommented:
I has a similar problem. What I did finally is wrote the 32 bit thunking dll using VisualC++.
0
eppsmanAuthor Commented:
Unfortunately, I do not have access to Visual C++. The only compiler I have is Borland C++ 5.0
0
NexialCommented:
I believe that there are linkers that accept both formats, so you would not have to do the conversion.   I am explicitly thinking of the linker for IBM's Visual Age system.  (I did not go hunting - which is why this is a comment). If you can acquire such a linker then, it could obviate the need for the conversion.

0
RLMCommented:
I ran into same problem. I write in Borland Tasm but need DirectX libs which are COFF. Since Borland's linker only supports OMF, I have to link using VC's linker which supports both. This kinda sucks though since now my debugger is useless (VC's linker doesn't recognise debug info in OMF obj's). I looked everywhere for conversion utility but came up empty handed. C'est la vie.
0
eppsmanAuthor Commented:
Well, maybe I'll need to use the VC++ linker then... Thanks for your help.
0
Tommy HuiEngineerCommented:
I think the Watcom or Symantec compiler has such a tool. I don't remember exactly what it is, but they do have one.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KrueckeCommented:
When using Borland C++ Builder there is a command line utility shipped called coff2cob.exe (located in the bin folder). Maybe this is helpful for you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.