Page 1 of 1
COFF to OMF
Posted: Thu May 11, 2006 5:50 am
by B.E
I am trying to build a simple application in borland c++ using the GDI+ api. I have got the application syntaxincly compiling but can not seem to link it. I downloaded it Gdi+ libary for VC+(there is none for borland c++), but the libary is in COFF format. Borland C++ only reads OMF format libarys.
I tried to use COFF2OMF, but most of the symbles are messing from the converted libary.
Is there any way i can convert the libary to COFF?
Re:COFF to OMF
Posted: Thu May 11, 2006 6:26 am
by bluecode
I don't know the answer to your question...
I just want to say that Microsoft provides the Microsoft Visual C++ 2005 Express Edition for free on their homepage and with vc++ you will not have any problems linking against the GDI+ library.
Re:COFF to OMF
Posted: Thu May 11, 2006 6:39 am
by B.E
I have to do it in borland c++. because it is part of an assignment.
Re:COFF to OMF
Posted: Thu May 11, 2006 3:03 pm
by mystran
If it's part of your assignment, then you might want to ask your instructor:
"How can I link to GDI+? Is there a version that Borland understands somewhere?"
Assuming that you are required to use Borland and GDI+, then your instructor supposedly knows how to do it.
What is GDI+ anyway? I have been living under the impression that it has something to do with .NET? Can Borland deal with that? Or have I mistaken something?
(I'm going to admit that I do all my Win32 programming using the plain old Win32 C API, partly because it reminds me of SmallTalk.)
Re:COFF to OMF
Posted: Fri May 12, 2006 5:39 am
by B.E
mystran wrote:
What is GDI+ anyway? I have been living under the impression that it has something to do with .NET? Can Borland deal with that? Or have I mistaken something?
GDI+ is an extention on the standard GDI libary. It suport more Image formats(Which is what i am using it for), and has extra effect(such as transusent and Shading). Microsoft says that it is a native .NET API. but the acual functions are in standard binary.
I just got it to work. This is how I did it
I first copied the GdiPlus.Lib to a temp folder.
A "dumpbin /ALL" on the GdiPlus.lib. the copied all of the public functions to a seperate file then ran the following command in cygwin:
Code: Select all
awk 'BEGIN{
print LIBRARY GDIPLUS.DLL
print
print EXPORTS
}
{
i=match($2,/@/)
if (i!=0) {
print substr($2,2,i-2)
}
else{
print substr($2,2)
}
}' temp.txt > lib.def
than ran
implib GdiPlus.lib lib.def.
and the copied GdiPlus.lib to my project directory and added it to my project.
Thanks Anyway