Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Linking C main() to shlibs with Fortran sources using ccc/fort
@ 2002-04-16 20:03 Adam C Powell IV
  2002-06-23  3:29 ` Adam C Powell IV
  0 siblings, 1 reply; 4+ messages in thread
From: Adam C Powell IV @ 2002-04-16 20:03 UTC (permalink / raw)
  To: Debian Alpha, axp-list

Greetings,

I'd like to link some shlibs with some Fortran source to some C programs 
using the Compaq compilers to compile everything.  Trouble is, some of 
the Fortran objects need symbols like for_write..., which are provided 
by libfor.so, and that in turn needs this "MAIN__()" symbol, which is 
*only* provided by an fort-compiled object file with a Fortran PROGRAM 
statement, it's not in any of the libs which come with fort, nor in 
for_main.o.

I've noticed that if the libs are static, linking works just fine, but 
if I rebuild objects to shared libs using:

${LD} -shared -soname,$$LIBNAME.${SLSUFFIX} -o $$LIBNAME.${SLSUFFIX} *.o

then linking against the resulting shlibs fails with an undefined 
reference to MAIN__() in libfor.so.  Also, if I provide a C function like:

void MAIN__()
{
    printf ("hello world\n");
}

then it links fine, but hello world is never printed, so the function is 
never entered.  I'd really like to not have to provide this bit of code 
for this one arch/compiler combo...

Is there a way to do this?

Thanks,
-- 

-Adam P.

GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Welcome to the best software in the world today cafe! 
<http://lyre.mit.edu/%7Epowell/The_Best_Stuff_In_The_World_Today_Cafe.ogg>






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Linking C main() to shlibs with Fortran sources using ccc/fort
  2002-04-16 20:03 Linking C main() to shlibs with Fortran sources using ccc/fort Adam C Powell IV
@ 2002-06-23  3:29 ` Adam C Powell IV
  2002-06-23  3:58   ` George France
  0 siblings, 1 reply; 4+ messages in thread
From: Adam C Powell IV @ 2002-06-23  3:29 UTC (permalink / raw)
  To: axp-list; +Cc: Debian Alpha

Hello again,

Adam C Powell IV wrote:

> Greetings,
>
> I'd like to link some shlibs with some Fortran source to some C 
> programs using the Compaq compilers to compile everything.  Trouble 
> is, some of the Fortran objects need symbols like for_write..., which 
> are provided by libfor.so, and that in turn needs this "MAIN__()" 
> symbol, which is *only* provided by an fort-compiled object file with 
> a Fortran PROGRAM statement, it's not in any of the libs which come 
> with fort, nor in for_main.o.

In two months, no reply. :-(

Does anyone know where else I can turn for help with Q compilers?  (Yes, 
I know, caveat emptor with non-free software, etc.)

Thanks,
-- 

-Adam P.

GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Welcome to the best software in the world today cafe! 
<http://lyre.mit.edu/%7Epowell/The_Best_Stuff_In_The_World_Today_Cafe.ogg>






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Linking C main() to shlibs with Fortran sources using ccc/fort
  2002-06-23  3:29 ` Adam C Powell IV
@ 2002-06-23  3:58   ` George France
  2002-06-23  4:11     ` Adam C Powell IV
  0 siblings, 1 reply; 4+ messages in thread
From: George France @ 2002-06-23  3:58 UTC (permalink / raw)
  To: axp-list, Adam C Powell IV; +Cc: Debian Alpha

Hello Adam,

Free "peer-to-peer" support is available through a web site and mailing list 
hosted by the University of New Hampshire:

http://linux.iol.unh.edu/linux/fortran

Please let me know if you have any problems.

Best Regards,


--George

On Saturday 22 June 2002 23:29, Adam C Powell IV wrote:
> Hello again,
>
> Adam C Powell IV wrote:
> > Greetings,
> >
> > I'd like to link some shlibs with some Fortran source to some C
> > programs using the Compaq compilers to compile everything.  Trouble
> > is, some of the Fortran objects need symbols like for_write..., which
> > are provided by libfor.so, and that in turn needs this "MAIN__()"
> > symbol, which is *only* provided by an fort-compiled object file with
> > a Fortran PROGRAM statement, it's not in any of the libs which come
> > with fort, nor in for_main.o.
>
> In two months, no reply. :-(
>
> Does anyone know where else I can turn for help with Q compilers?  (Yes,
> I know, caveat emptor with non-free software, etc.)
>
> Thanks,




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Linking C main() to shlibs with Fortran sources using ccc/fort
  2002-06-23  3:58   ` George France
@ 2002-06-23  4:11     ` Adam C Powell IV
  0 siblings, 0 replies; 4+ messages in thread
From: Adam C Powell IV @ 2002-06-23  4:11 UTC (permalink / raw)
  To: axp-list, Debian Alpha

George France wrote:

>Hello Adam,
>
>Free "peer-to-peer" support is available through a web site and mailing list 
>hosted by the University of New Hampshire:
>
>http://linux.iol.unh.edu/linux/fortran
>
>Please let me know if you have any problems.
>
Thanks, looks good.

Zeen,
-- 

-Adam P.

GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Welcome to the best software in the world today cafe! 
<http://lyre.mit.edu/%7Epowell/The_Best_Stuff_In_The_World_Today_Cafe.ogg>






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-06-23  4:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-16 20:03 Linking C main() to shlibs with Fortran sources using ccc/fort Adam C Powell IV
2002-06-23  3:29 ` Adam C Powell IV
2002-06-23  3:58   ` George France
2002-06-23  4:11     ` Adam C Powell IV

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox