Page 2 sur 2
Publié : jeu. 14/déc./2006 17:13
par gnozal
Progi1984 a écrit :Comment peut on obtenir le fichier lib d'une DLL ?
Dans le cas ou pas d'un produit open source ?
NON TESTE
1. Télécharge
http://ftp.digitalmars.com/bup.zip
2. Utilise
implib.exe
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.
Publié : jeu. 14/déc./2006 17:16
par Progi1984
Attention : Impblib demande ces fichiers là :
DUMPBIN.EXE, LIB.EXE, LINK.EXE
Publié : jeu. 14/déc./2006 17:18
par gnozal
Progi1984 a écrit :Attention : Impblib demande ces fichiers là :
DUMPBIN.EXE, LIB.EXE, LINK.EXE
Je viens de le télécharger et lancer : il ne me demande rien ?!
c:\Internet.tmp>implib /s kernel32.lib c:\winnt\system32\kernel32.dll a écrit :Digital Mars Import Library Manager Version 7.6B1n
Copyright (C) Digital Mars 2000. All Rights Reserved.
Input is a Windows NT DLL file 'KERNEL32.dll'.
Output is a Windows NT import library.
Digital Mars Import Library Creator complete.
Publié : jeu. 14/déc./2006 17:26
par Progi1984
Serait ce une nouvelle version de implib alors ?
Intéressant ! J'avais une ancienne version de Implib me demandant ces fichiers !
** teste **
Exact ! nouvelle version !
Par contre, je transforme une DLL en LIB. Pas de pb ! Mais quand j'essaie de lister avec polib :
Code : Tout sélectionner
C:\Documents and Settings\usr1\Bureau\Divers\DLL LibRSvg>implib.exe /s libcairo-2.lib libcairo-2.dll
Digital Mars Import Library Manager Version 7.6B1n
Copyright (C) Digital Mars 2000. All Rights Reserved.
Input is a Windows NT DLL file 'libcairo-2.dll'.
Output is a Windows NT import library.
Digital Mars Import Library Creator complete.
C:\Perso\PureBasic\Compilers>polib.exe /list "c:\Documents and Settings\usr1\Bureau\Divers\DLL LibRSvg\libcairo-2.lib"
POLIB: fatal error: Corrupt library: 'c:\Documents and Settings\usr1\Bureau\Divers\DLL LibRSvg\libcairo-2.lib'.
Publié : jeu. 14/déc./2006 17:32
par gnozal
Progi1984 a écrit :Serait ce une nouvelle version de implib alors ?
Intéressant ! J'avais une ancienne version de Implib me demandant ces fichiers !
** teste **
Exact ! nouvelle version !
Par contre, je transforme une DLL en LIB. Pas de pb ! Mais quand j'essaie de lister avec polib :
Code : Tout sélectionner
C:\Documents and Settings\usr1\Bureau\Divers\DLL LibRSvg>implib.exe /s libcairo-2.lib libcairo-2.dll
Digital Mars Import Library Manager Version 7.6B1n
Copyright (C) Digital Mars 2000. All Rights Reserved.
Input is a Windows NT DLL file 'libcairo-2.dll'.
Output is a Windows NT import library.
Digital Mars Import Library Creator complete.
C:\Perso\PureBasic\Compilers>polib.exe /list "c:\Documents and Settings\usr1\Bureau\Divers\DLL LibRSvg\libcairo-2.lib"
POLIB: fatal error: Corrupt library: 'c:\Documents and Settings\usr1\Bureau\Divers\DLL LibRSvg\libcairo-2.lib'.
Oui, apparemment c'est une lib mais pas au format COFF ...
Désolé.