public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC: Linking problem
@ 2006-07-21 10:25 Shadow
  0 siblings, 0 replies; 3+ messages in thread
From: Shadow @ 2006-07-21 10:25 UTC (permalink / raw)
  To: gcc-help

Hi.

I have a C program that I need to compile.
The problem is that it has alot of callback functions.
The code compiles Ok, but on linking stage I'm getting alot of
'undefined reference' error.

How can I avoid that?
Is there some switch to turn that check off?


Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* gcc Linking problem
  1999-10-25  9:15 gcc " Alison Boyle
@ 1999-10-31 13:57 ` Alison Boyle
  0 siblings, 0 replies; 3+ messages in thread
From: Alison Boyle @ 1999-10-31 13:57 UTC (permalink / raw)
  To: help-gcc

When trying to compile using gcc on an intel box running Redhat Linux, I
get the following errors:

Linking...
getf.o: In function `get_fits':
/usr/src/getflat/getf.c:124: undefined reference to `usr_imagein'
/usr/src/getflat/getf.c:134: undefined reference to `rfts_data'
getf.o: In function `write_fits':
/usr/src/getflat/getf.c:143: undefined reference to `usr_imageout'
/usr/src/getflat/getf.c:145: undefined reference to `wfts_data'
/usr/src/getflat/getf.c:151: undefined reference to `wfts_char'
/usr/src/getflat/getf.c:156: undefined reference to `wfts_real'
collect2: ld returned 1 exit status
make: *** [getf] Error 1

These are all functions related to reading/writing FITS files and are
declared in header files which are included at the start of the program.
I'm linking using -lm -luti -lcfitsio -lX11.
libutil.a,libuti.a and libcfitsio.a all seem to be installed fine.
The program compiles fine on an Alphastation running Digital UNIX.
I don't know if there are just some other libraries I need to install?

Cheers
Ali


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* gcc Linking problem
@ 1999-10-25  9:15 Alison Boyle
  1999-10-31 13:57 ` Alison Boyle
  0 siblings, 1 reply; 3+ messages in thread
From: Alison Boyle @ 1999-10-25  9:15 UTC (permalink / raw)
  To: help-gcc

When trying to compile using gcc on an intel box running Redhat Linux, I
get the following errors:

Linking...
getf.o: In function `get_fits':
/usr/src/getflat/getf.c:124: undefined reference to `usr_imagein'
/usr/src/getflat/getf.c:134: undefined reference to `rfts_data'
getf.o: In function `write_fits':
/usr/src/getflat/getf.c:143: undefined reference to `usr_imageout'
/usr/src/getflat/getf.c:145: undefined reference to `wfts_data'
/usr/src/getflat/getf.c:151: undefined reference to `wfts_char'
/usr/src/getflat/getf.c:156: undefined reference to `wfts_real'
collect2: ld returned 1 exit status
make: *** [getf] Error 1

These are all functions related to reading/writing FITS files and are
declared in header files which are included at the start of the program.
I'm linking using -lm -luti -lcfitsio -lX11.
libutil.a,libuti.a and libcfitsio.a all seem to be installed fine.
The program compiles fine on an Alphastation running Digital UNIX.
I don't know if there are just some other libraries I need to install?

Cheers
Ali


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-21 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-21 10:25 GCC: Linking problem Shadow
  -- strict thread matches above, loose matches on Subject: below --
1999-10-25  9:15 gcc " Alison Boyle
1999-10-31 13:57 ` Alison Boyle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).