[Scons-users] MS Visual Studio Install tries to find a not-existing file
Philipp Kraus
philipp.kraus at flashpixx.de
Wed Aug 22 07:25:21 EDT 2012
On 2012-08-21 04:00:57 +0200, Gary Oberbrunner said:
> On Sun, Aug 19, 2012 at 8:39 AM, Kraus Philipp
> <philipp.kraus at flashpixx.de> wrote:
>> Hello,
>>
>> I compile under MS Visual Studio 2010 Express the LUA library.
>>
>> lib = envlua.Library(target="lua", source=libsrc)
>> envlua.Install( "targetpath", lib )
>>
>> In this case, VS builds a *.lib file and installs it within the target
>> directory.
>> So if I switch to a shared library:
>>
>> lib = envlua.SharedLibrary(target="lua", source=libsrc)
>> envlua.Install( "targetpath", lib )
>>
>> The Install command shows:
>> scons: *** [library\build\LUA\5.2.1\lib\lua.lib] library\lua.lib: No
>> such file or directory
>>
>> It is a correct error message, but no lua.lib is build (static build),
>> so the Install command
>> searches the static and the dynamic library. It seems, that the Install
>> command searches
>> on dynamic build also a static library.
>>
>> I would like to build only the DLL not the static version and would
>> like to install the file
>> in the target place
>
> SharedLibrary on Windows actually creates three files: the dll, the
> import library (the .lib), and a .exp file. The builder returns a
> list of all three of them in that order, so your lib[0] is the .dll
> and so on. Note that when you build a dll on Windows, you do need to
> build the corresponding .lib -- it's not a static lib, it's the import
> lib. (It's not like other OSes.) If your code isn't producing a
> .lib, you probably are missing your export directives.
Yes thanks Garry, I have read the MSDN and see the difference on Windows
DLLs and other OS's. In this case I need a compilerflag to activate the exports
of the DLL.
Phil
More information about the Scons-users
mailing list