This is the mail archive of the cygwin@sources.redhat.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]

Re: AW: Linking Dynamic Libraries


Ross Smith wrote:
> 
> Charles Wilson wrote:
> >
> > You still need to worry about things like __declspec(dllexport) and
> > __declspec(dllimport).
> 
> What's the point of --export-all-symbols then? I was under the
> impression that it was intended to duplicate the Unix convention,
where
> all external symbols are automatically exported from a .so.
(Actually,
> the help refers to "global" symbols, not "external", but I assumed
that
> just meant that whoever wrote the help didn't know C++.)


If you really want to --export-all in C++, this is a workaround.
Create a def with dlltool:
 dlltool --export-all --output-def foo_.def --dllname foo.dll *.o

Then look at the def file.  Do you still really want to export-all?

To use that def file with ld -shared you need to get rid of the
comments (demangled names) 
cut does the job:
  cut -d ';' -f 1 foo_.def >foo.def

Cheers


_____________________________________________________________________________
http://clubs.yahoo.com.au - Yahoo! Clubs
- Join a club or build your own!

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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