www.digitalmars.com         C & C++   DMDScript  

c++.command-line - Going to create a tool for importing libs

reply "SStallone" <sstallone gmx.de> writes:
I try to create a tool that helps creating the right .def files for DLL.

this is thought so

sc xxxx.c > imp.def

then my tool will remove all error messages but not the import names with  x
then it adds EXPORTS to first line of imp.def

you must enter the names of dlls that are needed in the imp.def file
manually.

perhaps someone has a good idea for doing this automaticially

stay tuned perhaps i manage it or i will never sleep well
Jul 23 2001
next sibling parent reply Cesar Rabak <csrabak uol.com.br> writes:
SStallone wrote:
 
 I try to create a tool that helps creating the right .def files for DLL.
 
 this is thought so
 
 sc xxxx.c > imp.def
 
 then my tool will remove all error messages but not the import names with  x
 then it adds EXPORTS to first line of imp.def
 
 you must enter the names of dlls that are needed in the imp.def file
 manually.
 
 perhaps someone has a good idea for doing this automaticially

If the only remaining task is to remove the x it can be done easily with scripting languages like AWK, Perl or (my favorite) Python*.
 
 stay tuned perhaps i manage it or i will never sleep well

HTH Cesar (*) and yes I _know_ about Ruby, but have not personal experience with it!
Jul 24 2001
parent reply "SStallone" <sstallone gmx.de> writes:
 If the only remaining task is to remove the  x it can be done easily
 with scripting languages like AWK, Perl or (my favorite) Python*.

That's not correct. We MUST add these x suffixes to the .def files as M$ semms to have them cut out of the dll. Bad M$. I still don't know why C++ needs these suffixes. Thes suffixes stand for the total ammount of bytes that are used by parameters. 0 means this function has no parameters 4 means this function has 4 bytes of parameters (2 WORDS or 1 DWORD) I even believe that these informations ARE in the dll. You only need to fund them. Best regards Chris (from Germany)
Jul 24 2001
parent Cesar Rabak <csrabak uol.com.br> writes:
SStallone wrote:
 
 If the only remaining task is to remove the  x it can be done easily
 with scripting languages like AWK, Perl or (my favorite) Python*.

That's not correct. We MUST add these x suffixes to the .def files as M$ semms to have them cut out of the dll. Bad M$. I still don't know why C++ needs these suffixes. Thes suffixes stand for the total ammount of bytes that are used by parameters. 0 means this function has no parameters 4 means this function has 4 bytes of parameters (2 WORDS or 1 DWORD) I even believe that these informations ARE in the dll. You only need to fund them.

When we arrive at a means to get this info, we can automate it! In fact adding x to .def files is even easier. .
Jul 25 2001
prev sibling parent lmemsm yahoodot.com (LM) writes:
sstallone gmx.de (SStallone) wrote in <9jj2d4$sjt$1 digitaldaemon.com>:
I try to create a tool that helps creating the right .def files for DLL.

Don't know if the object file formats are compatible, but the mingw compiler has some tools for creating .def files from standard DLLs. For more information, check pexports at http://www.is.lg.ua/~paul/devel/binutils.html and impdef at http://www.geocities.com/Tokyo/Towers/6162/impdef.zip Hope this is useful. Laura http://groups.yahoo.com/group/CppDesign
Oct 14 2001