![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Symbol referencing error | fromatz | High Level Programming | 1 | 03-17-2008 03:01 PM |
| C++ Compiling error.. Symbol Reference | bjena | UNIX for Advanced & Expert Users | 3 | 08-08-2006 11:10 PM |
| ld: fatal: Symbol referencing errors. No output written to SNX | jerryragland | High Level Programming | 1 | 08-08-2006 10:15 PM |
| symbol referencing error | suhasini | High Level Programming | 1 | 04-03-2006 03:43 AM |
| ld: fatal: Symbol referencing errors | alfabetman | UNIX for Dummies Questions & Answers | 2 | 01-08-2002 01:57 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to compile a FTP_API program. To do this you must use the libftp.so libary. But that libary has references which are not defined. Has anyone had this problems and how is it corrected??
The command line looks like this:-------------------------------------------- # cc ftpstock.c -lftp Undefined.........................first referenced symbol..............................in file _xlisten............................./udk/usr/lib/libftp.so _xbind.............................../udk/usr/lib/libftp.so _xsetsockopt ..................../udk/usr/lib/libftp.so _xconnect........................../udk/usr/lib/libftp.so gethostbyname................./udk/usr/lib/libftp.so _xaccept............................/udk/usr/lib/libftp.so getservbyname................../udk/usr/lib/libftp.so inet_ntoa.........................../udk/usr/lib/libftp.so _xsocket............................./udk/usr/lib/libftp.so inet_addr............................/udk/usr/lib/libftp.so _xgetsockname................../udk/usr/lib/libftp.so UX:ld: ERROR: a.out: fatal error: Symbol referencing errors. No output written to a.out ------------------------------------------------------------------------------- Want do you guys think? I have stdio.h and net/libftp.h included in the file. Thanks, Mike Last edited by spotanddot; 07-11-2001 at 06:39 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
libftp.so needs the socket libaries. There was a thread recently with the same exact problem and the -lsocket or -lsock linker option was described. Sound like you need to link the socket libs.
|
|
#3
|
|||
|
|||
|
I've done that and two different functions that have no references which are not defined pop up. It's an endless circle.
__use_iks_version.................../udk/usr/lib/libsocket.so _set_use_iks_version............../udk/usr/lib/libsocket.so Tkanks neo, Mike |
|
#4
|
||||
|
||||
|
No, it is not an endless circle, it is a straight line making sure that all the libraries are linked during the linking phase -- pretty much one of the core architecturals constructs of C programming. Finding all the libraries takes time if you have not used them before. After using them; it gets easier
Having said that, I am not sure which libs have the symbols you are missing in the sockets library. What version of UNIX are you working with and what is the compiler? |
|
#5
|
|||
|
|||
|
Similar case
Did you try with
cc progra.c -lsocket -lnsl not sure whether this will help you thanks Reddyb |
|
#6
|
|||
|
|||
|
Thanks guys,
reddyb-- including -lnsl worked!!!! Thanks again, Mike |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|