This is the mail archive of the cygwin 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]
Other format: [Raw text]

RE: G77, libg2c and a linking problem



Dave Korn wrote:

> Can we then assume that the cernlib build process is doing something
> unneccessary or unusual or incorrect?

What would be 'unusual or incorrect' in

$ cat hello.F
      program hello
      implicit none
      write(*,*) 'Hello!'
      end

(1)
$ g77 hello.F -o hello -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -lg2c
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):(.text+0xab):
 undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status


(2)
$ g77 hello.F -L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -lg2c -o hello

$ ./hello
 Hello!

?


> It should all become clear in terms of the linker's requirement that
> undefined references must always come in objects earlier than the
> symbols that satisfy those references

I know this...but then '-o hello' contains symbols that satisfy previous
references ? 
(compare (1) with (2))



Cheers,

   Angelo.




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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