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: little help with dll


marvin wrote:

> hi-

> first... thanks Gerrit for the help.  i think i am
> making more progress.  i never built my own dll as an
> export library.  it is fun to try.

You'll need it only if you want to link executables or other modules
against the first module.

> i have a question about this code below.  the way i
> have it set up is fox.dll is the name of the dll i
> want to create.  fox.dll.a is (good question) i guess
> it is a output product of the process.  then i supply
> my object files.  then i supply the name of the import
> libs i need to link against.  

> here is a question.  do i have to supply all 19 of
> these import libs that end with *.a in my
> cygwin/lib/mingw directory?  i know there can be tons
> of these *.a and 19 is not very many but that is lots
> of typing.  is there a way i can not specify the path
> and then import lib name for every one of the 19.  for
> i.e. could i somehow skip the path and just list each
> one with some mystery setting or make it so it looks
> automatically at the directory and takes all the *.a
> files.  

Yes see below:

> -my settings for the last step required to build
> dll------------------------------------------------------

> c++ -shared -o fox.dll \
>     -Wl,--out-implib=fox.dll.a \
>     -Wl,--export-all-symbols \
>     -Wl,--enable-auto-import \
>     -Wl,--whole-archive /cygwin/fox.o /cygwin/fox_wrap.o  \
>     -Wl,--no-whole-archive 
> /cygwin/lib/mingw/libmingw32.a

> -----------------------------------------------

Shorter:
-Wl,--no-whole-archive -L/usr/lib/mingw -lmingw32


Gerrit
-- 
=^..^=                                     http://nyckelpiga.de/donate.html


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]