[squeak-dev] Linking a plugin with a library

Bert Freudenberg bert at freudenbergs.de
Mon Apr 27 11:06:11 UTC 2009


On 27.04.2009, at 12:23, Igor Stasenko wrote:

> 2009/4/27 John Daniels <jd at syntropy.co.uk>:
>> Hi all,
>>
>> I'd appreciate some help with building a plugin for Windows. The
>> plugin generates and compiles fine; the problem is at the link stage.
>> I don't know how to configure the make so that it links the plugin
>> with a library that it requires. I've searched the web but I haven't
>> been able to find anything that covers this specifically. Any  
>> pointers
>> you can give me would be welcomed.
>>
>
> You need to add an option to linker in your plugin makefile
> like:
> -lmyimportlibrary
>
> and to generate import library, please read this page:
> http://oldwiki.mingw.org/index.php/CreateImportLibraries

A common way is to link the required library statically. That way your  
users do not have to worry about dependencies, installing DLLs with  
the right versions etc. To do that, add the mylibrary.a file to the  
linker command line.

- Bert -





More information about the Squeak-dev mailing list