Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

COFF to OMF import library conversion

Posted on 1998-02-11
10
Medium Priority
?
2,430 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

704 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