MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

sz72
MAME Fan
Reged: 08/20/07
Posts: 78
Send PM
Re: For Windows Developers: some questions
10/09/11 09:39 PM


> Hello there. I am very uninformed when it comes to Microsoft Windows programming.
> It's not that hard to make portable code, so compiling my code is not the hard part;
> the hard part is figuring out exactly what developers expect from a binary version of
> a library.
>
> On Linux (my main development platform), I can simply build a static library and
> shared library and package it along with the headers and that's all I need.
>
> But on Windows I am not sure exactly what I would need to produce for a binary
> version of a library meant to be picked up and used by other developers. I have seen
> Windows libraries distributed with .dll files in a 'bin' directory, or sometimes in a
> 'lib' directory. Sometimes I see files that end in .def as well.
>
> Can someone who is a Windows programmer tell me exactly what they would expect to
> find in a .zip file that contained a compiled C++ library? Just for reference, I
> expect at a minimum to provide: libmame.a, libmame.dll, libmame.h ...
>
> I have actually read about Windows .dlls and such so I know something of how shared
> libraries work on Windows but I can't tell exactly what the conventions are for
> distributing them.
>
> Will a .dll compiled by MingW be sufficient for linking by any Windows compiler? Are
> there any special caveats I need to pay attention to? The GNU toolchain doesn't seem
> to require all of the 'dllexport/dllimport' baloney that I often see in Windows code
> - is that stuff needed for other Windows compilers, or is it just optional?
>
> I hope to be releasing some code and a library soon and the Linux version has been
> ready since forever, but I just finished putting the finishing Windows porting
> touches on it and now I have no idea how to actually make a distributable version for
> Windows, so any hints at all will be most helpful.
>
> Thanks!

The minimum is the dll and the corresponding import library.
But the import library is compiler specific (dll must not be).
So you can include a .def file, a text file that can be used to create an import library for the specific compiler of the user.
There are more or less automatic ways to create a def file and an import library if you have only the dll.







Entire thread
Subject Posted by Posted on
* For Windows Developers: some questions Bryan Ischo 10/07/11 06:24 PM
. * Re: For Windows Developers: some questions sz72  10/09/11 09:39 PM
. * Re: For Windows Developers: some questions Bryan Ischo  10/10/11 06:40 AM
. * Re: For Windows Developers: some questions lharms  10/17/11 01:46 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 71 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2641