This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Problems compiling xsystem35 under cygwin
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: cygwin-xfree at cygwin dot com
- Date: Thu, 31 Jul 2003 22:20:21 -0400 (EDT)
- Subject: Re: Problems compiling xsystem35 under cygwin
- Reply-to: cygwin-xfree at cygwin dot com
- Reply-to: cygwin-xfree at cygwin dot com
On Thu, 31 Jul 2003, Thomas Morgan wrote:
> > Or, you could use the precompiled binaries distributed by the KDE on
> > Cygwin project that already have SHM enabled.
>
> Well, that solved about half the problem.
>
> Now it does this...
>
> gcc: unrecognized option `-rdynamic'
> xsystem35.o(.text+0x1700):xsystem35.c: undefined reference to `_haveUNIT'
> image.o(.text+0x1b5d):image.c: undefined reference to `_ablend16_ppp'
> image.o(.text+0x198c):image.c: undefined reference to `_ablend16_dpd'
> image.o(.text+0x1d64):image.c: undefined reference to `_ablend16_ppd'
> image.o(.text+0x1e81):image.c: undefined reference to `_ablend16_ppd'
> collect2: ld returned 1 exit status
> BASH-2.05b$
>
> The ablend16 ones are from alpha_blend16.o, which is made from assembly
> language source. Since it's linked in before image.o is, I don't know
> why it couldn't find it. (Admittedly, I have little experience with
> linking large multiple-file programs.) haveUNIT also seems to come from
> an assembly language file, so maybe that's part of the problem.
Actually, you've got it backwards. The linker normally looks for
unresolved references in *later* files, so you should place the file
providing the function on the command line *after* the one using the
function. However, this may only pertain to libraries. Check the
function names in assembly code -- you might need to explicitly prepend
the underscore to these names, as that's how C looks for them.
Alternatively, you may need to pass some options to the assembler to do
the name mangling for you.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton