digitalmars.D.learn - Using my .lib files in D
- Stan Hebben (6/6) Dec 28 2006 Hello,
- Daniel Keep (15/25) Dec 28 2006 I'm assuming you're on Windows.
- Stan Hebben (3/3) Dec 29 2006 I recompiled some of my libraries to OMF, and some are import libraries,...
- BCS (4/8) Dec 29 2006 if you have source, try re compiling with dmc (the c/c++ compiler
Hello, When I try to use my .lib files in D, the linker doesn't recognize the format. (the lib files start with <arch>) Is there a way to convert my libraries to a format which the D linker recognizes? Thanks Stan
Dec 28 2006
Stan Hebben wrote:Hello, When I try to use my .lib files in D, the linker doesn't recognize the format. (the lib files start with <arch>) Is there a way to convert my libraries to a format which the D linker recognizes? Thanks StanI'm assuming you're on Windows. The problem is that a lot of the .LIB files out there are for MSVC, which uses the COFF format for static libraries. DMD supports OMF. If the library is JUST an import library (ie: for using a DLL), then there are a few tools available to either try and convert the .LIB file, or generate a .DEF file as an alternative. You can get implib (to CREATE an import library from a DLL) as part of the Basic Utilities pack for DMC (http://ftp.digitalmars.com/bup.zip, linked from http://www.digitalmars.com/download/freecompiler.html). If you're looking to use something more substantial, you can try coff2omf, which is part of the extended utilities package: http://www.digitalmars.com/eup.html Hope this helps. -- Daniel
Dec 28 2006
I recompiled some of my libraries to OMF, and some are import libraries, but that doesn't cover everything. Unfortunately, the extended utitilies package is not for free.
Dec 29 2006
Stan Hebben wrote:I recompiled some of my libraries to OMF, and some are import libraries, but that doesn't cover everything.if you have source, try re compiling with dmc (the c/c++ compiler available on digitalmars.com) BTW, D wont link with C++, only with C.Unfortunately, the extended utitilies package is not for free.
Dec 29 2006