LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   ld linker errors (https://www.linuxquestions.org/questions/programming-9/ld-linker-errors-368340/)

Ankit mittal 09-29-2005 11:53 PM

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

$@ya 09-30-2005 03:05 PM

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.


All times are GMT -5. The time now is 06:08 AM.