[Scons-users] .def file generation issue with SCons

Sumit Kothari sumit8kothari at gmail.com
Fri Jul 9 12:49:57 EDT 2021


Hi,

Just like WINDOWS_EXPORT_ALL_SYMBOLS generates .def file in CMake, if you
provide me steps to generate .def file using SCons in windows will be of
great help.
In SCons doc only the following lines are mentioned

WINDOWS_INSERT_DEF

When this is set to true, a library build of a Windows shared library
(.dll file)
will also build a corresponding .def file at the same time, if a .def file
is not already listed as a build target. The default is 0 (do not build a
.def file).



If you provide me one simple example showing how to use WINDOWS_INSERT_DEF
in program will be useful to me.

Thanks,
Sumit


[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
07/09/21,
10:17:42 PM

On Fri, Jul 9, 2021 at 5:24 PM Sumit Kothari <sumit8kothari at gmail.com>
wrote:

> Hi,
>
>
>
> I am facing an issue while generating .def file using SCons. I created
> simple f1.c file and Sconstruct file as mentioned below.
>
>
>
> f1.c
>
> ===
>
> int fun()
> {
>     int i=10;
>     i++;
>
>     return i;
> }
>
>
>
>
>
> Sconstruct
>
> =======
>
> env = Environment()
>
>
> env['WIN32_INSERT_DEF']=1
>
> env['WINDOWS_INSERT_DEF']=1
>
>
>
> env.SharedLibrary('f1', source = ['f1.c'],
> WINDOWS_INSERT_DEF=1,WIN32_INSERT_DEF=1)
>
>
>
>
>
> Error message
>
> =========
>
> scons: *** [f1.dll] Source `f1.def' not found, needed by target `f1.dll'.
>
>
>
>
> As per scons doc, it should create .def file but I am getting error. Can
> you please give some hints on this.
>
> [image: Mailtrack]
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> Sender
> notified by
> Mailtrack
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> 07/09/21,
> 05:24:13 PM
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20210709/f5db0ba1/attachment-0001.htm>


More information about the Scons-users mailing list