Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 09-30-2005, 02:05 AM   #1
Ankit mittal
LQ Newbie
Registered: Sep 2005
Location: india
Posts: 11

Rep: Reputation: 0
ld linker error

i am new to this group and new to linux programming.
i am working on large project and facing problem in linking.
i try to create exe from shared library.
but it create warning and error as shown below..

/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

plz give me any idea about these warnings and meaning of it.
suggestion to remove it most welcomed.
Old 09-30-2005, 03:14 AM   #2
Senior Member
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,421

Rep: Reputation: 200Reputation: 200Reputation: 200
well for a kick-off.
looks like main occurs in logon and main
source files.
You can only have one 'main' per executable.
Old 09-30-2005, 08:40 AM   #3
Ankit mittal
LQ Newbie
Registered: Sep 2005
Location: india
Posts: 11

Original Poster
Rep: Reputation: 0
after posting it .i got off from my problem.
thanks for quick reply..


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 error pavan Programming 2 10-06-2005 02:58 AM
Linker error eddydw Linux - General 0 09-20-2004 02:21 PM
Linker Error dim79 Programming 2 06-28-2003 10:53 AM
Kylix3 Linker Error dim79 Linux - Software 0 06-27-2003 11:57 AM
linker error Config Programming 8 06-04-2002 04:33 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:56 AM.

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