www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DxErr.lib

reply Sascha Katzner <sorry.no spam.invalid> writes:
Anyone has an idea how to convert DxErr.lib (from the DirectX SDK) from 
COFF to OMF? It is not an import library, so coffimplib.exe only says:

 d:\D>coffimplib.exe DxErr.lib -f
 Error: not an import library

It seems it implements at least:
 DXGetErrorString 
 DXGetErrorDescription 
 DXTrace

BTW Walter: Please rewrite OPTLINK, so that it understands OMF directly... pretty please with a cherry on top. ;-) LLAP, Sascha Katzner
Nov 06 2007
next sibling parent reply Jascha Wetzel <firstname mainia.de> writes:
Sascha Katzner wrote:
 Anyone has an idea how to convert DxErr.lib (from the DirectX SDK) from 
 COFF to OMF? It is not an import library, so coffimplib.exe only says:
 
 d:\D>coffimplib.exe DxErr.lib -f
 Error: not an import library


you could use implib to create the lib file directly from the dll.
 It seems it implements at least:
 DXGetErrorString DXGetErrorDescription DXTrace


but since it seems to define functions, you can try coff2omf instead.
Nov 06 2007
parent reply Sascha Katzner <sorry.no spam.invalid> writes:
Jascha Wetzel wrote:
 you could use implib to create the lib file directly from the dll.

There is no DxErr.dll, the code for the mentioned 3 functions is only in the lib file.
 but since it seems to define functions, you can try coff2omf instead.

Just tried that and it didn't work. The resulting lib is much smaller (4.4mb vs. 2.1mb) and if I try to link it, OPTLINK terminates with an "Unexpected OPTLINK Termination at EIP=0044C37B". :(
Nov 06 2007
parent reply Leo Walkling <leopold_walkling web.de> writes:
 Jascha Wetzel wrote:
 
 you could use implib to create the lib file directly from the dll.
 

in the lib file.
 but since it seems to define functions, you can try coff2omf instead.
 

(4.4mb vs. 2.1mb) and if I try to link it, OPTLINK terminates with an "Unexpected OPTLINK Termination at EIP=0044C37B". :(

Using coff2omf, you first have to convert it to the old COFF, Microsoft's made its own, so try as described in http://www.digitalmars.com/ctg/coff2omf.html using the Visual Studio 6 linker, AFAIK it only works with v6
Nov 06 2007
parent reply Sascha Katzner <sorry.no spam.invalid> writes:
Leo Walkling wrote:
 Using coff2omf, you first have to convert it to the old COFF, 
 Microsoft's made its own, so try as described in 
 http://www.digitalmars.com/ctg/coff2omf.html using the Visual Studio
 6 linker, AFAIK it only works with v6

Just tried that too and it has no effect, the resulting lib from coff2omf is identical to the one without the VS6-Linker step. :-( http://img452.imageshack.us/img452/9656/optlinkterminationgj3.png
Nov 07 2007
parent reply Jascha Wetzel <firstname mainia.de> writes:
Sascha Katzner wrote:
 Leo Walkling wrote:
 Using coff2omf, you first have to convert it to the old COFF, 
 Microsoft's made its own, so try as described in 
 http://www.digitalmars.com/ctg/coff2omf.html using the Visual Studio
 6 linker, AFAIK it only works with v6

Just tried that too and it has no effect, the resulting lib from coff2omf is identical to the one without the VS6-Linker step. :-( http://img452.imageshack.us/img452/9656/optlinkterminationgj3.png

i once had problems finding the correct linker version for this. i'm not sure if it's the one from VS6, but the one that worked for me is Microsoft (R) Incremental Linker Version 6.00.8168
Nov 07 2007
parent Sascha Katzner <sorry.no spam.invalid> writes:
Jascha Wetzel wrote:
 i once had problems finding the correct linker version for this. i'm not 
 sure if it's the one from VS6, but the one that worked for me is
 Microsoft (R) Incremental Linker Version 6.00.8168

That is the one from VS6.
Nov 07 2007
prev sibling next sibling parent reply Sascha Katzner <sorry.no spam.invalid> writes:
Sascha Katzner wrote:
 BTW   Walter: Please rewrite OPTLINK, so that it understands OMF 
 directly... pretty please with a cherry on top. ;-)

argh! COFF, not OMF! ;-)
Nov 06 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Sascha Katzner wrote:
 Sascha Katzner wrote:
 BTW   Walter: Please rewrite OPTLINK, so that it understands OMF 
 directly... pretty please with a cherry on top. ;-)

argh! COFF, not OMF! ;-)

I believe Walter said before that if he did rewrite OPTLINK (a *big* if) he would probably change it use ELF (or maybe DWARF now?), not COFF. --bb
Nov 06 2007
parent Sascha Katzner <sorry.no spam.invalid> writes:
Bill Baxter wrote:
 I believe Walter said before that if he did rewrite OPTLINK (a *big*
 if) he would probably change it use ELF (or maybe DWARF now?), not
 COFF.

The question is, if this would be wise for the future of D. I suppose the missing COFF support is a big reason for a lot of people to not use D in their projects. A lot of people work (or have to work) with M$ products and sometimes you have no control or choice which libraries you have to use or in which format they are available. And the probability that a given library is comming from a M$ product and is therefore a COFF is high. Therefore I think D should at least have the capability to *import* the most important object/lib formats. It neither have to use them in the complete "toolchain" nor does it have to export in it. I've looked and found the posting from Walter, he wrote that the reason why he doesn't want to use COFF is that M$ keeps changing the format and he doesn't have the time to follow that... perhaps this will change sometime if we keep asking nice. ;-) LLAP, Sascha Katzner
Nov 06 2007
prev sibling next sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Sascha Katzner" <sorry.no spam.invalid> wrote in message 
news:fgpgn7$un9$1 digitalmars.com...
 Anyone has an idea how to convert DxErr.lib (from the DirectX SDK) from 
 COFF to OMF? It is not an import library, so coffimplib.exe only says:

 d:\D>coffimplib.exe DxErr.lib -f
 Error: not an import library

It seems it implements at least:
 DXGetErrorString DXGetErrorDescription DXTrace

BTW Walter: Please rewrite OPTLINK, so that it understands OMF directly... pretty please with a cherry on top. ;-) LLAP, Sascha Katzner

If all you need is DXGetErrorDescription, don't bother, it's kind of pointless. Even if you use DxErr.dll from the Clootie graphics page, it's still a ~600KB DLL. I have no idea why it's so huge. Instead, you can grab the GetDXErrorDescription function from http://www.dsource.org/projects/nonagon/browser/trunk/nonagon/core.d.
Nov 06 2007
parent Sascha Katzner <sorry.no spam.invalid> writes:
Jarrett Billingsley wrote:
 If all you need is DXGetErrorDescription, don't bother, it's kind of
  pointless.  Even if you use DxErr.dll from the Clootie graphics
 page, it's still a ~600KB DLL.  I have no idea why it's so huge.
 Instead, you can grab the GetDXErrorDescription function from 
 http://www.dsource.org/projects/nonagon/browser/trunk/nonagon/core.d.

I hoped to go the official way, since every time the file gets updated from M$ I have to recheck my error function, if I implement it myself.
Nov 07 2007
prev sibling next sibling parent reply dickl <dick221z yahoo.com> writes:
I have an OMF version of dxerr8.lib. Wish I could remember how I made 
it. Its too big to post, email me and I sent it.


Dick


Sascha Katzner wrote:
 Anyone has an idea how to convert DxErr.lib (from the DirectX SDK) from 
 COFF to OMF? It is not an import library, so coffimplib.exe only says:
 
 d:\D>coffimplib.exe DxErr.lib -f
 Error: not an import library

It seems it implements at least:
 DXGetErrorString DXGetErrorDescription DXTrace

BTW Walter: Please rewrite OPTLINK, so that it understands OMF directly... pretty please with a cherry on top. ;-) LLAP, Sascha Katzner

Nov 06 2007
parent Sascha Katzner <sorry.no spam.invalid> writes:
dickl wrote:
 I have an OMF version of dxerr8.lib. Wish I could remember how I made 
 it. Its too big to post, email me and I sent it.

Thanks, but I need dxerr.lib (without a number at the end). It's for Direct3D 10.
Nov 07 2007
prev sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
Sascha Katzner wrote:
 BTW   Walter: Please rewrite OPTLINK, so that it understands OMF 
 directly... pretty please with a cherry on top. ;-)

I'd love to rewrite Optlink. I'd fix it so it could read OMF, ELF and COFF, and then switch the compiler over to generating ELF only.
Nov 07 2007
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Walter Bright" <newshound1 digitalmars.com> wrote in message 
news:fgt6pg$2l0j$1 digitalmars.com...
 Sascha Katzner wrote:
 BTW   Walter: Please rewrite OPTLINK, so that it understands OMF 
 directly... pretty please with a cherry on top. ;-)

I'd love to rewrite Optlink. I'd fix it so it could read OMF, ELF and COFF, and then switch the compiler over to generating ELF only.

Do it! Follow your dreams! ;)
Nov 07 2007
prev sibling parent "Rioshin an'Harthen" <rharth75 hotmail.com> writes:
"Walter Bright" <newshound1 digitalmars.com> kirjoitti viestissä 
news:fgt6pg$2l0j$1 digitalmars.com...
 Sascha Katzner wrote:
 BTW   Walter: Please rewrite OPTLINK, so that it understands OMF 
 directly... pretty please with a cherry on top. ;-)

I'd love to rewrite Optlink. I'd fix it so it could read OMF, ELF and COFF, and then switch the compiler over to generating ELF only.

Please do!
Nov 08 2007