473,657 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Undefined reference to '...' error under gcc

1 New Member
I am facing the problem of calling cfitsio library from C program in linux. when i am giving compiling my C program using options
"gcc -o CreateLevel1Dat aFitsFile CreateLevel1Dat aFitsFile.c -lm -lcfitsio
"
i am getting following error

/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(ge tcolj.o)(.text+ 0x7065):/backup/Astrosat/learning/cfits/cfitsio/getcolj.c:3098: more undefined references to `__xtoll' follow
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(ge tcolk.o)(.text+ 0x1bdd): In function `ffgclk':
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(pu tcolk.o)(.text+ 0x22ce): In function `ffintfi8':
/backup/Astrosat/learning/cfits/cfitsio/putcolk.c:903: undefined reference to `__xtoll'
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(pu tcolk.o)(.text+ 0x22f5):/backup/Astrosat/learning/cfits/cfitsio/putcolk.c:905: undefined reference to `__xtoll'
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(pu tcoluk.o)(.text +0x18a3): In function `ffpcnuk':
/backup/Astrosat/learning/cfits/cfitsio/eval.y:2856: undefined reference to `__xtol'
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(ev al_y.o)(.text+0 xf801):/backup/Astrosat/learning/cfits/cfitsio/eval.y:2971: undefined reference to `__xtol'
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(ev al_y.o)(.text+0 xfbe9): In function `Do_BinOp_dbl':
/backup/Astrosat/learning/cfits/cfitsio/eval.y:3028: undefined reference to `__xtol'
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(ev al_y.o)(.text+0 x1023d):/backup/Astrosat/learning/cfits/cfitsio/eval.y:3140: more undefined references to `__xtol' follow
collect2: ld returned 1 exit status
Reply With Quote
Jun 23 '10 #1
1 1487
Banfa
9,065 Recognized Expert Moderator Expert
The function _xtoll (or xtoll?) is not in any library or object file you have linked with so the linker can no resolve the reference to it that exists in the code in libcfitsio.a

Are you missing a library you should be using? or are you missing an object or source file you should be using?
Jun 24 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
13115
by: RU | last post by:
Hi, I am working on a porting project to port C/C++ application from unixware C++, AT&T Standard components to g++ with STL on Linux. This application has been working properly on Unixware/C++/AT&T componets environment. I have been able to compile all modules after making necessary changes in LINUX/gcc/STL environment. We have two templates defined XList and XMap.
40
3204
by: vfunc | last post by:
I get an undefined reference error for a definition that clearly looks like it is in a .h file. So what can be the cause of an undefined reference error, when this .h file containing the definition has been included and the namespace has been declared. I blame engineers they are all ponsey zealots.
8
9810
by: utab | last post by:
Dear all, I am getting an undefined reference error wrn I try to initilialize a static map in the class constructor. my map: map<string,vector<string> > m; and in the constructor classname::classname(){
8
3539
by: vfunc | last post by:
I get compile error: undefined reference to snd_pcm_format_width. I included the library directory with -I flag on gcc. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sched.h> #include <errno.h> #include <getopt.h>
1
3676
by: yeah | last post by:
hi friends I tried to link c++ object files using "bfin-elf-ld" and got some undefined reference errors Errors::::: (.text+0x2ee8): undefined reference to `operator delete(void*)' (.text+0x2ef4): undefined reference to `_Unwind_Resume' (.text+0x2efa): undefined reference to `operator new(unsigned long)' (.text+0x25f6): undefined reference to `__muldf3' (.text+0x2620): undefined reference to `__floatsidf'
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.