News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Polib V4.00

Started by Vortex, August 29, 2005, 09:32:21 AM

Previous topic - Next topic

Vortex

Hi friends,

Polib V4.00 available from PellesC package has now the new features:

- Making module definition files from import libraries
- Converting OMF import libraries to COFF

Polib creates module definition files with decorated names :

polib /makedef:kernel32.def \masm32\lib\kernel32.lib


LIBRARY "kernel32.dll"
EXPORTS
"_AddAtomA@4" ; kernel32.dll
"_AddAtomW@4" ; kernel32.dll
"_AllocConsole@0" ; kernel32.dll
"_AllocateUserPhysicalPages@12" ; kernel32.dll
"_AreFileApisANSI@0" ; kernel32.dll
"_AssignProcessToJobObject@8" ; kernel32.dll
"_BackupRead@28" ; kernel32.dll
.
.
.



POLIB OMF-library /OUT:library

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Vortex

Hi Mark,

Yes, Pelle is doing a very nice job.

You can easily convert the module definiton file to an import library :

polib /def:kernel32.def /out:kernel32.lib

Farabi

 :U How to made a definition from a .dll?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

PellesC

Something like this...


POLIB name.DLL /OUT:dummy.lib /MAKEDEF:name.DEF


(You must create a dummy import library, or POLIB will complain - you can just delete it afterwards.)

Pelle

Grincheux

I followed the instructions that Vortex gave for converting a library for using with masm.
My problem comes with mysql.

Quotepolib /makedef:mysqlclient.def mysqlclient.lib
polib /def:mysqlclient.def /out:mysqlclient.lib

polib /makedef:libmysql.def libmysql.lib
polib /def:libmysql.def /out:libmysql.lib

There are two libraries : mysqlclient and libmysql.
For libmysql I got the "def file" but for mysqlclient, the "def file" is empty.

If I call the function mysql_init from my asm source file and I get the following error :

QuoteF32-Serveur.obj : error LNK2001: unresolved external symbol _mysql_init
F32-Serveur.exe : fatal error LNK1120: 1 unresolved externals

I defined "mysql_init" like this

Quotemysql_init                  PROTO   C,__hMySql:HANDLE

Can someone help me ?

Thanks
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz

Grincheux

I solved the problem using this :
QuoteC:\MyProjects\F32-Serveur\Libraries>lib2def *.lib
Processing libmysql.lib
Processing mysqlclient.lib

C:\MyProjects\F32-Serveur\Libraries>def2lib *.def
Processing libmysql.def
Processing mysqlclient.def

C:\MyProjects\F32-Serveur\Libraries>lib2inc *.lib
Processing libmysql.lib
Processing mysqlclient.lib

C:\MyProjects\F32-Serveur\Libraries>

Great thanks to the author.
Kenavo

Grincheux
_____________________________________________________
http://www.phrio.biz