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

Re: Porting - link error


On Sat, 17 May 2003, Campbell Fethers wrote:

> Trying to port heyu2. (Command line interface for x10 home automation. See
> http://heyu.tanj.com/heyu2/. Basically, it just sends commands to a serial
> port, and spawns a daemon to listen for responses.)
>
> Achieved clean compile after adding a few #include<>'s and changing timezone
> to _timezone.
>
> When attempting to link:
>
> gcc  -o heyu2 date.o erase.o info.o message.o relay.o monitor.o reset.o setclock.o stop.o tty.o turn.o x10.o xread.o xwrite.o status.o cm11a.o eeprom.o preset.o process.o sun.o -lm -lc
> fu000001.o(.idata$3+0xc): undefined reference to `__cygnus_netrel_build_cygwin_1_3_22_1_i686_pc_cygwin_winsup_cygwin_libc_a_iname'
> fu000002.o(.idata$3+0xc): undefined reference to `__cygnus_netrel_build_cygwin_1_3_22_1_i686_pc_cygwin_winsup_cygwin_libc_a_iname'
> fu000005.o(.idata$3+0xc): undefined reference to `__cygnus_netrel_build_cygwin_1_3_22_1_i686_pc_cygwin_winsup_cygwin_libc_a_iname'
> fu000006.o(.idata$3+0xc): undefined reference to `__cygnus_netrel_build_cygwin_1_3_22_1_i686_pc_cygwin_winsup_cygwin_libc_a_iname'
> nmth000000.o(.idata$4+0x0): undefined reference to `__nm___tzname'
> Info: resolving __tzname by linking to __imp___tzname (auto-import)
> collect2: ld returned 1 exit status
> make: *** [heyu2] Error 1
>
> nm lists a symbol
> ___cygnus_netrel_build_cygwin_1_3_22_1_i686_pc_cygwin_winsup_cygwin_libc_a_iname
> in /lib/libc.a with three leading underscores.
> I looked in man ld, but couldn't find anything to help.
>
> Any suggestions would be appreciated
> Thank you.

Campbell,

The fact that you had to change timezone to _timezone should have been
your first clue.  There is something wrong with the name mangling (perhaps
a wrong calling convention declared?) for that particular project.  You
might want to look into gcc's "-fleading-underscore" option ("info gcc").
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
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]