[Scons-users] MS Visual Studio Install tries to find a not-existing file

Kraus Philipp philipp.kraus at flashpixx.de
Sun Aug 19 16:54:33 EDT 2012



Am 19.08.2012 um 22:34 schrieb Francis Bolduc:


> try doing the following before your call to SharedLibrary:

>

> envlua.AppendUnique(CPPDEFINES=['LUA_BUILD_AS_DLL'])

>

> This will enable this Microsoft-only, non-standard, non-portable

> attribute known as "__declspec(dllimport/dllexport)" in the LUA source

> code.


Thanks a lot, I have create at this time only the static lib, but I will test ist in the next days


>

> Welcome to Microsoft Windows.

>

> Forget about shared libraries. Here symbols have to be explicitly "exported".

>

> You really ought to read a lot. Developing software on Microsoft

> Windows is orders of magnitude harder than on unix systems.

>


yes, OSX, BSD and Linux are easy. My scons build script for unix systems are
very small on windows I need a lot different checks and options.

Phil


> --

> Francis Bolduc, B.Sc.

>

>

> On Sun, Aug 19, 2012 at 11:20 AM, Matthieu Brucher

> <matthieu.brucher at gmail.com> wrote:

>> No, the .lib is created by the compiler, but you have to specify which

>> function can be accessible by the program and exported:

>> http://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx

>>

>>

>> Cheers,

>>

>> Matthieu

>>

>> 2012/8/19 Kraus Philipp <philipp.kraus at flashpixx.de>

>>>

>>> Hi,

>>>

>>> yes I'm developing primary under unix systems, so there exists a *.so

>>> or/and *.a file and they are independed.

>>> I will read the chapter, but how can I realize this in / with scons? I

>>> would like to link the DLL in my program

>>>

>>> Should I create a env.Library first and pass the result to

>>> env.SharedLibrary and this output to the env.Install?

>>>

>>> Thanks

>>>

>>> Phil

>>>

>>>

>>> Am 19.08.2012 um 16:25 schrieb Matthieu Brucher:

>>>

>>> Hi,

>>>

>>> That's because the build process should return 2 files, the dll and the

>>> lib file. The first is the one you deploy, but the second is the one that is

>>> needed to link an application. Linux doesn't define something like that, I

>>> suggest you read the MSDN chapter on shared libraries and exported

>>> functions/classes/methods/...

>>>

>>> Matthieu

>>>

>>> 2012/8/19 Philipp Kraus <philipp.kraus at flashpixx.de>

>>>>

>>>> Hi Matthieu,

>>>>

>>>>

>>>> thanks for your answer, but I don't understand the answer.

>>>>

>>>> I call scons in the Visual Studio CommandLine and build a shared library

>>>> with env.SharedLibrary

>>>>

>>>> The result of this call is passed to env.Install and if the scons script

>>>> runs, the error is shown after building.

>>>>

>>>>

>>>> I found in my build directory the *.dll file, so I think the

>>>> env.SharedLibrary builder works. But the "copy-process"

>>>>

>>>> breaks with the error, because the env.Install call try to copy two files

>>>> *.dll and *.lib, but the *.lib file does not

>>>>

>>>> exist. My problem is, to install / copy the builded library into my

>>>> installation directory.

>>>>

>>>>

>>>> Phil

>>>>

>>>>

>>>> On 2012-08-19 14:53:24 +0200, Matthieu Brucher said:

>>>>

>>>>

>>>> Hi Philip,

>>>>

>>>>

>>>> The .lib file is not only the name of the static library, for a shared

>>>> library it contains everything needed to link against the dll. It is built

>>>> only if you export something. If you don't export functions, it means that

>>>> you won't be able to link against it, only load it with something like

>>>> "LoadLibrary".

>>>>

>>>>

>>>> Cheers,

>>>>

>>>>

>>>> Matthieu

>>>>

>>>>

>>>> 2012/8/19 Kraus Philipp <philipp.kraus at flashpixx.de>

>>>>

>>>> 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

>>>>

>>>>

>>>> How can I solve this problem?

>>>>

>>>>

>>>> Thanks

>>>>

>>>>

>>>> Phil

>>>>

>>>>

>>>> _______________________________________________

>>>>

>>>> Scons-users mailing list

>>>>

>>>> Scons-users at scons.org

>>>>

>>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>>>

>>>>

>>>>

>>>>

>>>> --

>>>>

>>>> Information System Engineer, Ph.D.

>>>>

>>>> Blog: http://matt.eifelle.com

>>>>

>>>> LinkedIn: http://www.linkedin.com/in/matthieubrucher

>>>>

>>>> Music band: http://liliejay.com/

>>>>

>>>>

>>>> _______________________________________________

>>>>

>>>> Scons-users mailing list

>>>>

>>>> Scons-users at scons.org

>>>>

>>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>>>

>>>>

>>>>

>>>> _______________________________________________

>>>> Scons-users mailing list

>>>> Scons-users at scons.org

>>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>>>

>>>

>>>

>>>

>>> --

>>> Information System Engineer, Ph.D.

>>> Blog: http://matt.eifelle.com

>>> LinkedIn: http://www.linkedin.com/in/matthieubrucher

>>> Music band: http://liliejay.com/

>>>

>>> _______________________________________________

>>> Scons-users mailing list

>>> Scons-users at scons.org

>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>>

>>>

>>>

>>> _______________________________________________

>>> Scons-users mailing list

>>> Scons-users at scons.org

>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>>

>>

>>

>>

>> --

>> Information System Engineer, Ph.D.

>> Blog: http://matt.eifelle.com

>> LinkedIn: http://www.linkedin.com/in/matthieubrucher

>> Music band: http://liliejay.com/

>>

>>

>> _______________________________________________

>> Scons-users mailing list

>> Scons-users at scons.org

>> http://four.pairlist.net/mailman/listinfo/scons-users

>>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users




More information about the Scons-users mailing list