473,473 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem while linking .a file

Hi,
I encountered a problem when compiling multiple files with make file on
solaris. The program uses a thrid party library file(.a) and when
linking it to the program with -l option i get a error stating:

ld: elf error: file library.a(lib_obj.o): elf_strptr: Request error: no
string table
ld: elf error: file library.a: elf_begin: Format error: archive fmag
ld: fatal: File processing errors. No output written to Main
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `Main'

As this error states there is no string table associated with one of
the .o file archived to the library. I confirmed it by using nm
utility. It listed the string tables associated with many other .o
files but failed only one. Is there any way that i can generate the
string table by just having this archive?

And i have no idea what Format error is supposed to mean.... could
someone please throw some light on this?

Thanks a lot....

Mar 3 '06 #1
2 4184
[cross-posting deleted]

Nithya wrote:
Hi,
I encountered a problem when compiling multiple files with make file on
solaris. The program uses a thrid party library file(.a) and when
linking it to the program with -l option i get a error stating:

ld: elf error: file library.a(lib_obj.o): elf_strptr: Request error: no
string table
ld: elf error: file library.a: elf_begin: Format error: archive fmag
ld: fatal: File processing errors. No output written to Main
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `Main'

As this error states there is no string table associated with one of
the .o file archived to the library. I confirmed it by using nm
utility. It listed the string tables associated with many other .o
files but failed only one. Is there any way that i can generate the
string table by just having this archive?

And i have no idea what Format error is supposed to mean.... could
someone please throw some light on this?

Thanks a lot....


This is off-topic here (see
http://www.parashift.com/c++-faq-lit....html#faq-5.9).
Perhaps one of your cross-posts will be of help.

Cheers! --M

Mar 3 '06 #2
"Nithya" <ni******@gmail.com> writes:
As this error states there is no string table associated with one of
the .o file archived to the library. I confirmed it by using nm
utility. It listed the string tables associated with many other .o
files but failed only one. Is there any way that i can generate the
string table by just having this archive?


No, you cannot generate the string table from the object. The information
appears lost. The best you can do is rebuild the archive without the
particular .o file in it.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Mar 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
7
by: Ittay Dror | last post by:
Hi I have this peculiar situation. I have a library of utility classes, which I use to compile a binary. I want to reimplement a method in class. The class is only a collection of static...
2
by: noe | last post by:
Hello, I have linked a '.c' file and I have obtained next fail: C:\prueba2\sfilter>build -cZ BUILD: Object root set to: ==> objchk BUILD: Adding /Y to COPYCMD so xcopy ops won't hang. BUILD:...
4
by: Gary Hughes | last post by:
Hi all, sometime I posted a problem in here where I was getting the following error from the linker in VS C++ 2003. Linking... GCClass.obj : error LNK2022: metadata operation failed (80131188)...
1
by: buchalino | last post by:
Hi Guys, Please can someone help me, I am having a linking problem . I am writing a socket program, the problem is just the linking . I am using VC++ In the process of the problem, I...
2
by: key9 | last post by:
Hi all on last post I confused on how to organize file of class, ok ,the problem solved : should include class define head on cpp file. but this time ,still link error: strange is I put the...
1
by: fsmountain | last post by:
Hi guys, I am trying to compile VTK5.0 with Qt GUI Support in Windows 2000 that has Qt Open-Sourced 4.1.2 and CMake 2.4.2 installed. After QVTK is enabled in CMake, configuring it will prompt...
1
by: karthik28 | last post by:
I tried linking an excel spreadsheet to an access database. It shows me a window with the data but the header row in missing. However, when I open the excel file, save it without making any changes...
0
by: Fred | last post by:
Is there is a better newsgroup for this question? I am having a problem linking assemblies into one using Dotfuscator Pro 4.0. The problem occurs when linking the following into one exe:...
4
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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,...
1
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...
0
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,...
1
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...
0
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
muto222
php
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.