This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Re[4]: Importing a variable from a DLL
- To: Paul Sokolovsky <paul-ml@is.lg.ua>
- Subject: Re: Re[4]: Importing a variable from a DLL
- From: Mumit Khan <khan@xraylith.wisc.EDU>
- Date: Fri, 27 Aug 1999 01:07:57 -0500
- cc: Anders Norlander <anorland@hem2.passagen.se>, James Stern <jsternitg@yahoo.com>, cygwin@sourceware.cygnus.com
Paul Sokolovsky <paul-ml@is.lg.ua> writes:
>
> I am still feeling misunderstood. Let me go with it once again,
> with examples.
>
> So, dlltool has ability to create implib from def - it's all nice
> with it, it supports DATA, sure.
No, no, I do get your point. And, it's a very good one that I had
ignored earlier in this thread.
I'm currently adding changes to GCC so that exported data items have
the correct "data" tag in the .drectve section. This will enable us
to handle this in dlltool and dllwrap when the import libraries are
created. I'll hopefully test the gcc and dlltool changes this weekend
(it's pretty trivial).
With this change, you can do the following:
/* dll file. */
__declspec(dllexport) int exported_var;
__declspec(dllexport) void exported_fund () { }
/* end dll file. */
$ gcc -c dll.c
$ dllwrap -o foo.dll --output-lib libfoo.a dll.o
Now the import library will have what Paul suggests.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com