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

Problem with making shared library in GnuWin


Hi,

I have CygWin B19.1 and EGCS 1.1.

I'm trying to make a shared library. First I tried to compile all source files
with the -fPIC commandline option as is normally needed for position independent
code. However this gives me the following error message:

/Cygnus/B19/H-i386-cygwin32/i386-cygwin32/bin/as.exe: bfd assertion fail /home/noer/src/97r2/devo/bfd/coff-i386.c:424
C:\TEMP\cc001110.s: Assembler messages:
C:\TEMP\cc001110.s:27: Error: Cannot represent relocation type BFD_RELOC_386_GOTPC

The same command and sources work on a regular Unix/Linux system (tested both Solaris
and Linux).

I then removed the -fPIC to see if that works and it did. However I now got the following
error when linking:

g++  -Wl -shared -o softrndr.so out/UNIX.so_X11/render/software/SoftwareRender.o out/UNIX.so_X11/render/graph3d.o out/UNIX.so_X11/render/software/scan.o out/UNIX.so_X11/render/softw16/scan16.o out/UNIX.so_X11/com/InterfaceDefs.o
out/UNIX.so_X11/com/csCom.o out/UNIX.so_X11/com/inttable.o out/UNIX.so_X11/system/xlib/loadlib.o  -L out/UNIX.so_X11/ -L /usr/X11R6.3/lib -lXext -lX11 -lm -L ../zlib -lz -L ../libpng -lpng -L ../libjpeg -ljpeg
g++: unrecognized option `-shared'

So how does one create shared libraries with EGCS 1.1 then?

Greetings and thanks in advance,


--
==============================================================================
Jorrit.Tyberghein@uz.kuleuven.ac.be, University Hospitals KU Leuven BELGIUM

"Chap with a whip got as far as the big sharp spikes last week," said
the low priest.
        -- Life in the Temple of Offler
           (Terry Pratchett, Reaper Man)
==============================================================================



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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