Boost logo

Boost :

From: Greg Chicares (chicares_at_[hidden])
Date: 2001-06-16 08:36:27


David Abrahams wrote:
>
> Is anyone out there familiar with building shared libraries under Cygwin?
>
> Does "g++ -shared" work?

Yes.

> When I tried it with a simple test program, I got:
> Cannot export _bss_end__: symbol not defined
> Cannot export _bss_start__: symbol not defined
> Cannot export _data_end__: symbol not defined
> Cannot export _data_start__: symbol not defined
> collect2: ld returned 1 exit status

This message might help
  http://www.cygwin.com/ml/cygwin/2001-03/msg00589.html
If the code has to do with python, try this one:
  http://www.mail-archive.com/cygwin@sources.redhat.com/msg11037.html

> Does it generate .so files that can be used in the usual unix fashion?

Ummm...it generates .dll files that can be used in the usual
windows fashion. I don't know enough about unix to say how
that differs.

> I realize there's something called dlltool; is that just for generating
> windows-standard DLLs, or is that the only way to generate a proper shared
> library with cygwin?

dlltool is rarely needed. Go here
  http://sources.redhat.com/cygwin/faq/faq_4.html#SEC97
and follow the link to
  http://cygwin.com/ml/cygwin/2000-06/msg00688.html
Where it says
| To compile bar.exe to use the DLL:
|
| gcc -DUSEDLL -c bar.c -o bar.exe
| gcc bar.o libfoo.import.a -o bar.exe
|
| That's all there is to it.
make this change:
- gcc -DUSEDLL -c bar.c -o bar.exe
+ gcc -DUSEDLL -c bar.c -o bar.o
I just verified that this works with the latest cygwin,
which uses gcc-2.95.3-4 .


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk