Solved

COFF to OMF import library conversion

Posted on 1998-02-11
10
2,379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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
 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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