473,503 Members | 1,647 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 CreateLevel1DataFitsFile CreateLevel1DataFitsFile.c -lm -lcfitsio
"
i am getting following error

/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(getcolj.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(getcolk.o)(.text+0x1bdd): In function `ffgclk':
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(putcolk.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(putcolk.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(putcoluk.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(eval_y.o)(.text+0xf801):/backup/Astrosat/learning/cfits/cfitsio/eval.y:2971: undefined reference to `__xtol'
/usr/lib/../lib/gcc/i386-redhat-linux/3.4.4/../../../libcfitsio.a(eval_y.o)(.text+0xfbe9): 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(eval_y.o)(.text+0x1023d):/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 1475
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
13105
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...
40
3164
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...
8
9730
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 ...
8
3525
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...
1
3668
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*)'...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7456
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...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4672
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...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.