This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DLLs


Sigh. One of these days I really need to rewrite that docu. I'll get to it. Eventually...

Scott A. Smith wrote:




1.) Is creation of a DLL using just gcc the preferred method now?

Yes.

It is
certainly quite easy to use, but is this documented anywhere?

sort of. 'info gcc', 'info ld', but you have to know where to look or you won't find it. :-(


It seems
     to automatically put in its own DLL entry point function as well?

Yes.


 2.) If trying to make a DLL with multiple commands, should one never use ld
     for linking (as I read on this list somewhere), but stick with gcc,
such
     as in the example above?

Yes. Otherwise things get *really* complicated. To get an idea of what gcc does for you, look at /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs



 3.) Is dllwrap supposed to just engulf the first 5 lines of the above
example?

Dllwrap predates the inclusion of (most of) its code into ld.exe itself. So it is *very* old -- I've been doing this for years now, and I have *never* directly invoked dllwrap when building a dll. (I believe libtool-1.4.2 invokes dllwrap, but that's an indirect usage. :-)



 4.) Using this multiple command method, is there a way to get dlltool or
dllwrap
     to automatically build a .DEF file so that one need not explictly  use
nm on
     the object files prior to these commands?

Dunno.


5.) Is dlltool and dllwrap to become obsolete?

IMO, they already are.

Are there man pages for
dllwrap?

No, I don't think so. I think Mumit Khan's old gcc-cygwin site had the most information about dllwrap.



My questions partially stem from a attempt to use the Dev-C++ IDE to manage
the build.

AAAAAAAAAAGGGGGGGGHHHHHHHH! pant pant pant

I'm okay now.

But Dev-C++ IDE is way offtopic for this list.

  6.) Anyone know why it is producing the undefined reference errors?

Probably because you're mixing dlls and import libs produced by different compilers/linkers. But that's just a guess.

--Chuck



--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]