Solved

COFF to OMF import library conversion

Posted on 1998-02-11
10
2,343 Views
Last Modified: 2013-12-03
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.
0
Comment
Question by:eppsman
10 Comments
 
LVL 1

Expert Comment

by:yl
ID: 1411155
If you want to convert an import library you can create the OMF library directly from the DLL using Borland's implib utility.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1411156
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
 

Author Comment

by:eppsman
ID: 1411157
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
 
LVL 1

Expert Comment

by:yl
ID: 1411158
I has a similar problem. What I did finally is wrote the 32 bit thunking dll using VisualC++.
0
 

Author Comment

by:eppsman
ID: 1411159
Unfortunately, I do not have access to Visual C++. The only compiler I have is Borland C++ 5.0
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:Nexial
ID: 1411160
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
 

Expert Comment

by:RLM
ID: 1411161
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
 

Author Comment

by:eppsman
ID: 1411162
Well, maybe I'll need to use the VC++ linker then... Thanks for your help.
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 120 total points
ID: 1411163
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
 

Expert Comment

by:Kruecke
ID: 1411164
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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now