Subject: linking problems with f2c
From: [email-masked] (Dinesh Jindal)

25 Feb 1997 02:31:33 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (WinNT; I)
Original-To: [email-masked]
Original-Sender: [email-masked]

I am using cygwin-gnu b17.1 on NT4.0.
In the project I am porting from Unix, there are a couple of fortran
files. I used f2c to convert those to C and then compiled using gcc.
At link time I am getting follwing errors:

/usr/local/lib/libf2c.a(rdfmt.o)(.bss+0x400000):rdfmt.c: multiple
definition of `_bss_start__'
/usr/local/lib/libf2c.a(open.o)(.data+0x400000):open.c: first defined
here
/usr/local/lib/libf2c.a(rdfmt.o)(.bss+0x400100):rdfmt.c: multiple
definition of `_bss_end__'
/usr/local/lib/libf2c.a(open.o)(.data+0x400000):open.c: first defined
here
/usr/local/lib/libf2c.a(wrtfmt.o)(.data+0x400000):wrtfmt.c: multiple
definition of `_bss_start__'
/usr/local/lib/libf2c.a(open.o)(.data+0x400000):open.c: first defined
here
....etc...

using -z muldefs doesn't help.

Could someone please suugest as to what might be wrong.

While building libI77.a and libF77.a (from f2c sources), and hence
libf2c.a,  I had to remove -x option from 'ld -r ..' in the makefile. 
With -x option in place I was getting following errors: 
libI77/wrtfmt.o(.text+0xca00):wrtfmt.c: reloc refers to symbol `text'
which is not being output
libI77/xwsne.o(.text+0xd150):xwsne.c: reloc refers to symbol `data'
which is not being output
....etc...

Are these two problems related? How do I workaround it.

Cheers!
Dinesh Jindal.

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".