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?
> 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
If the code has to do with python, try this one:
> 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
> 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
and follow the link to
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