Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-06-06 08:30:23

   Hi Andrej.

> So it seems that when I build my libraries the .lib
> import libraries are not created somehow, but the
> corresponding .dll files are. When I link the
> executable it looks for the import library and cannot
> find it obviously. Therefor I have some new (obvious)
> questions:
> * Why is speedo_handlers.lib not build?

   I have no idea. So your google is as good as my google. :-)

> * Is it possible to link to the speedo_hanedlers.dll
> directly instead of speedo_handlers.lib? Or is this
> silly?

   Well.. you can link to it from code... by using
LoadLibrary()/GetProcAddress()/FreeLibrary() or similar APIs... by I'm
guessing that is not the way you want to go...

   Another way is to construct the import library separately, e.g. by
defining a .def file containing a list of all the files exported from
the DLL and then using the implib utility or something similar.

   But the cleanest solution I see is discovering why your compiler is
not generating the import library in the first place and making it do
so. Nothing else will be portable between Linux & Windows.

   My first guess now after looking at Microsoft's help for the link.exe
/IMPLIB option is that you do not have any functions exported from your DLL.

   In order for them to be exported you need to use one of the following:
   - The __declspec(dllexport) keyword in the source code
   - EXPORTS statement in a .def file
   - An /EXPORT specification in a LINK command

   Try using the dependency walker (depends.exe) utility on your dll and
if it sees any functions as exported from the DLL you built.

   I guess the cygwin/GNU nm utility should be able to do the same.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at