[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] linker problem med ld (gcc)



----- Original Message -----
From: "Mads Bondo Dydensborg" <sslug@sslug>
> > Når jeg forsøger at compile mit program "source.c" får jeg følgende
fejl:
> >
> > $ gcc source.c
>
> Det var, om jeg så må sige, en kort kommandolinie.

Hvad mener du? Der er da ingen grund til at skrive mere... (eller hvad?)
Så vidt jeg ved så bør ovenstående komandolinie lave en fil "a.out", som du
da godt kan omdøbe til noget andet hvis du vil det.

> > ld: fatal: Symbol referencing errors. No output written to a.out
> > collect2: ld returned 1 exit status
> >
> > Programmet compilerer uden problemer med der kommer en bunke linker fejl
:(
> >
> > Jeg har forsøgt at finde et svar på Internettet, og det er
tilsyneladende et
> > kendt problem,
>
> Arh... :-)

ehh -- er det en tilsvining??
http://www.joedog.org/libping/misc/FAQ.shtml (nederst) (hint'et virker ikke)
http://gcc.gnu.org/ml/gcc-help/1999-11n/msg00457.html
osv
osv
(søg selv på google)

> > men jeg har ikke root access til det system jeg bruger så jeg
> > kan ikke ændre i make-files osv.
> >
> > Er der nogen der har nogele gode idéer? Evt. et alternativ til gcc (ld)?
Det
> > bedste ville være en compiler der kører på en win32-platform med en
linux
> > back-end. Findes det?
>
> Hvor meget erfaring har du med oversættelse? ;-) Hvad betyder sætningen
> "der kører på en win32-platform med en linux back-end"?

Jeg inrømmer at jeg primært arbejder i windows, men "oversættelse" af
programmer har jeg da prøvet et par gange i både windows og UNIX

Det jeg mener med "kører på en win32-platform med en linux back-end" er en
kompiler der kører under windows men generer kode til linux (UNIX).

> Hvad siger "gcc -v" til dig?

tjaa, jeg bliver ikke så meget klogere... men det er muligt du gør:

$ gcc -v source.c
Reading specs from
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/specs
gcc version 2.95.3 20010315 (release)

/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/cpp0 -l
ang-c -v -iprefix
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3sparc-su
n-solaris2.7/2.95.3/ -isystem
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/include
 -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -
D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__un
ix -Asystem(unix) -Asystem(svr4) -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachin
e(sparc) tunnel.c /tmp/ccdNa3pj.i
GNU CPP version 2.95.3 20010315 (release) (sparc)
#include "..." search starts here:
#include <...> search starts here:

/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/include
 /usr/unic/share/gcc/2.95.3/include
 /usr/unic/libexec/gcc/2.95.3/lib/sparc-sun-solaris2.6/include

/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:

/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/../../.
./../../../../../../include/g++-3
End of omitted list.
 /usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/cc1
/tmp/ccdNa3pj.i -quiet -dumpbase tunnel.c -version -o /tmp/ccp8PSCk.s
GNU C version 2.95.3 20010315 (release) (sparc-sun-solaris2.7) compiled by
GNU C version 2.95.3 20010315 (release).
 /usr/ccs/bin/as -V -Qy -s -o /tmp/cczAnkqr.o /tmp/ccp8PSCk.s
/usr/ccs/bin/as: Sun WorkShop 6 99/08/18

/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/collect
2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/crt1.o
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/crti.o
/lib/values-Xa.o
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/crtbegi
n.o -L/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3 -
L/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3 -L/opt
/SUNWhpc/lib -L/usr/local/lib -L/usr/local/gbar/lib -L/usr/ccs/bin -L/usr/cc
s/lib /tmp/cczAnkqr.o -lgcc -lc -lgcc
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/crtend.
o
/usr/unic/libexec/gcc/2.95.3/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/crtn.o
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.273
Undefined                       first referenced
 symbol                             in file
socket                              /tmp/cczAnkqr.o
recv                                /tmp/cczAnkqr.o
accept                              /tmp/cczAnkqr.o
send                                /tmp/cczAnkqr.o
bind                                /tmp/cczAnkqr.o
inet_addr                           /tmp/cczAnkqr.o
listen                              /tmp/cczAnkqr.o
connect                             /tmp/cczAnkqr.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status

/Kasper



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *