Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C compiler / Linker Problem 1

Status
Not open for further replies.

dickiebird

Programmer
Feb 14, 2002
758
0
0
GB
This is a continuation of my previous thread Thread52-389134
(I have also posted this in IBM AIX forum)
The compiler is now running - but the linker gets upset at the end of the make :

cc -I. -I/usr/cgenbb/include -I/usr/cg-index/include -I/data/Y2K/build_2.0.9/include -L. -L/data/Y2K/build_2.0.9/lib -L/data/Y2K/build_2.0.9/lib -L/usr/cgenbb/lib -L/usr/cg-index/lib -lips -lcgenbb -lcg-index -lcurses -lacc -lm m_utprint.c -I. -I/usr/cgenbb/include -I/usr/cg-index/include -I/data/Y2K/build_2.0.9/include lard.o utprint.o -lcgenbb -lcg-index -lcurses -lacc -lm -o ./lard
ld: 0711-224 WARNING: Duplicate symbol: _esys
ld: 0711-224 WARNING: Duplicate symbol: _etrap
ld: 0711-224 WARNING: Duplicate symbol: Holdscr
ld: 0711-224 WARNING: Duplicate symbol: Aos_print
ld: 0711-224 WARNING: Duplicate symbol: _pass_scr
ld: 0711-224 WARNING: Duplicate symbol: _isys
ld: 0711-224 WARNING: Duplicate symbol: _data
ld: 0711-326 ERROR: Replaced XTY_CM symbol _data is larger
than the symbol that replaces it.
ld: 0711-326 ERROR: Replaced XTY_CM symbol _data is larger
than the symbol that replaces it.
ld: 0711-224 WARNING: Duplicate symbol: _r
make: The error code from the last command is 8.
Stop.
make: The error code from the last command is 2.


The Warnings are not a problem, (yet) but....
ERROR : Replaced XTY_CM symbol _data is larger......
What is an XTY_CM symbol ???????
Looks like ambiguous names in libraries, but where or which?
Anyone any ideas on this ????
TIA
;-) Dickie Bird
Honi soit qui mal y pense
 
includes ?? ord of linked objs ?? -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
definetely the order of libraries! [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Fixed - subject to further tests.
I changed the order of object resolution (I put 'major' libraries first and user-written ones last).
- Hey presto - no complaints from the compiler !
Thanks to jamisar for the hint.
;-)
Dickie Bird
Honi soit qui mal y pense
 
I'm getting the same exact problem with one of my objects (called cval). The thing is that I don't have any user created libraries... The end of my outfile is below (it is finishing listing my duplicate files, which aren't a problem yet--it's just the cval I guess). Any ideas? Thanks in advance...

>outfile<

** Duplicate ** sexs.c(sexs.o)
** Duplicate ** tgov3.c(tgov3.o)
** Duplicate ** {/usr/lib/libc.a[shr.o]}
cval cutil.c(cutil.o)
** Duplicate ** edrc.c(edrc.o)
ld: 0711-326 ERROR: Replaced XTY_CM symbol cval is larger
than the symbol that replaces it.
RESOLVE: 9037 of 111957 symbols were kept.
RESOLVE: The return code is 8.
 
This should really have been a new thread wilkic

My guess is your code contains a variable called cval, and the object you're linking with has a function called cval
 
Sorry I didn't make this a new thread (I'm new to tek-tips). My code definitely has extensive use of cval. Here's the thing: all this code compiled fine on AIX when I was making a .exe for my application but now that I'm doing a .dll it gives me this error. Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top