www.digitalmars.com Home | Search | CTG | RTL | IDDE | STL
Last update Sat Apr 8 23:54:06 2006
Compiler & Tools Guide

Compiling
Compiling Code
C Implementation
C++ Implementation
Language Extensions
Mixing Languages
Assembly Language
Inline Assembler
Optimizing Code
Numerics Programming
Regular Expressions
Acrtused
Pragmas
Precompiled Headers
Predefined Macros
Warning Messages
Error Messages
Runtime Messages


Linking
Optlink
Switches
Module Definition Files
Operation and Design
Error Messages


Win32 Programming
Win32 Programming


DOS and Win16
Programming

Memory Models
16 Bit Pointer Types
and Type Modifiers

Handle Pointers
DOS
DOS 32 (DOSX)
Win16
Win16 DLLs
Win16 Prolog/Epilog


C/C++ Extensions
Contract Programming
__debug statement
__debug declaration
Dynamic Profiling
Embedding C in HTML


Tools
BCC
CHMOD
CL
COFF2OMF
COFFIMPLIB
DMC
DIFF
DIFFDIR
DUMP
DUMPOBJ
DUMPEXE
EXE2BIN
FLPYIMG
GREP
HC
IMPLIB
LIB
LIBUNRES
MAKE
MAKEDEP
ME
OBJ2ASM
PATCHOBJ
RC
RCC
SC
SHELL
SMAKE
TOUCH
UNMANGLE
WHEREIS


Porting to DMC++
Switching to DMC++
from Microsoft
from Borland
Porting Guide


IMPLIB

Build an Import Library

An import library is necessary when calling functions in a DLL; it provides the stubs that hook up to the DLL at runtime. IMPLIB is used to create import libraries. It uses as input either the DLL itself or a module definition (.def) file.

implib commands have the following format:

	implib [switches] libfile [ dllfile | deffile ]
  • libfile is the name of the import library file to create. .lib is the default extension.
  • dllfile is the name of the DLL to create an import library for. .dll is the default extension.
  • deffile is the name of the DLL's module definition file. The extension .def is required.
  • switches
    /? Print this message.
    /b[atch] Batch.
    /h[elp] Print this message.
    /i[gnorecase] Ignore case of symbols.
    /noi[norecase] Be case sensitive. Mark library as case sensitive.
    /nol[ogo] Ignored.
    /now[ep] Ignore WEP (relevant only to 16 bit DLL's).
    /ntd[ll] Ignored.
    /p[agesize]:number Set page size to number (a power of 2).
    /s[ystem] Prepend '_' to exported internal names. Used to create import library from Windows NT system DLLs (for example, kernel32.dll). Note that this switch is not available via the IDDE.
Either a dllfile or deffile must be given (but not both). IMPLIB reads the file, and uses the export records in it to create an import library libfile. libfile is then linked in with your application.

To create the import library kernel32.lib from the NT system dll kernel32.dll:

	implib /s kernel32.lib kernel32.dll
Module definition files are in the same format as that used to create the DLL.