Re: .def file generation issue with SCons

Sumit Kothari <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CANtf=2P7rfTy_3_KPRRwKu3p+pADYZdxb_7w294N-Tg1te9YSg@mail.gmail.com>
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 <[email protected]>
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
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.