LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2005, 11:53 PM   #1
Ankit mittal
LQ Newbie
 
Registered: Sep 2005
Location: india
Posts: 11

Rep: Reputation: 0
Question ld linker errors


i am new member of this group.
my problem related to ld linker error.
i am working on very large project and try to make one exe with linking lot of library.
firstly it gives undefined reference error.
/home/ankit/A5.opt/linuxport/shlib/libURPC.a(lmso_svc.o)(.text+0x156): In function `.L12':
: undefined reference to `rpcgetdatabases_1'

After that include that file in which rerfernce defined..
but it repoduced another error as

/home/ankit/A5.opt/linuxport/shlib/libURPC.a(logon.o)(.data.rel.local+0x0): multiple definition of `pyrModuleName'

/home/ankit/A5.opt/linuxport/dev/ucpmain/src/main.o(.data.rel.local+0x4): first defined here
/home/ankit/A5.opt/linuxport/shlib/libURPC.a(logon.o)(.text+0x1860): In function `main':
: multiple definition of `main'

/home/ankit/A5.opt/linuxport/dev/ucpmain/src/main.o(.text+0x140): first defined here
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: Warning: size of symbol `main' changed from 1959 in /home/ankit/A5.opt/linuxport/dev/ucpmain/src/main.o to 354 in /home/ankit/A5.opt/linuxport/shlib/libURPC.a(logon.o)

/home/ankit/A5.opt/linuxport/shlib/libspclass.a(spec.o)(.text+0x7055): In function `specEdit(char*, char*, char*, void*, int, int, int, void (*)(void*, MsgObj), void*, MsgObj&)':
: warning: the use of `tempnam' is dangerous, better use `mkstemp'
collect2: ld returned 1 exit status

i donot know about the meaning of these error and warning..
plz give some introduction about it and suggest me to way solve out it..
thanks in advance
 
Old 09-30-2005, 03:05 PM   #2
$@ya
LQ Newbie
 
Registered: Jun 2005
Distribution: SUSE 9.2
Posts: 13

Rep: Reputation: 0
I am really not sure what you are trying to do. These linker error are pretty much mean that some of your libraries have a same definition of a function( same function name) and main() basically means you are going to start program execution from there, and i think you have two mains in your whole project which is not right.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linker errors with Kylix3 C++ on Mandrake 9.1 HVDV Programming 10 08-30-2006 11:12 PM
ld linker error Ankit mittal Programming 2 09-30-2005 07:40 AM
linker errors -please help MarcReing Programming 1 07-20-2005 07:44 AM
C++ - class template - linker errors? Wynd Programming 2 10-19-2004 03:54 PM
Linker errors daveyboy685 Linux - Software 1 03-25-2004 12:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration