473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to link libxml when compiling?

I have this error message when compiling mx_init.c by linking libxml
library as follow:

gcc `xml2-config --cflags` -c mx_init.c `xml2-config --libs` -g -Wall
gcc: -lxml2: linker input file unused because linking not done
gcc: -lz: linker input file unused because linking not done
gcc: -lpthread: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done

How can I fix this error?
Thank you in advance.

Jimin Lee

May 28 '07 #1
3 3809
In article <11**********************@p77g2000hsh.googlegroups .com>,
geoplab <ge*****@gmail.comwrote:
>I have this error message when compiling mx_init.c by linking libxml
library as follow:
>gcc `xml2-config --cflags` -c mx_init.c `xml2-config --libs` -g -Wall
gcc: -lxml2: linker input file unused because linking not done
gcc: -lz: linker input file unused because linking not done
gcc: -lpthread: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done
>How can I fix this error?
gcc and libraries are not really on topic in comp.lang.c, which
deals with the C language rather than with the specifics of
any implementation.

<OT>
Read the output. The libraries were not used because linking
was not done. Why was linking not done? Because you told it not
to link.

$ man gcc
-c Compile or assemble the source files, but do not link. The link-
ing stage simply is not done.
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest
May 28 '07 #2
geoplab wrote:
I have this error message when compiling mx_init.c by linking libxml
library as follow:

gcc `xml2-config --cflags` -c mx_init.c `xml2-config --libs` -g -Wall
gcc: -lxml2: linker input file unused because linking not done
gcc: -lz: linker input file unused because linking not done
gcc: -lpthread: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done

How can I fix this error?
This is compiler-specific, so really doesn't belong in comp.lang.c. A
gcc newsgroup or mailing list might have been a better choice. An even
better choice is to check your documentation, where you would find that
the "-c" flag tells the compiler not to link or produce an executable.
Since it refuses to do what you told it not to do, there is no error.
Here's a hint: when an application does what you tell it to, and you
don't like the result, then you probably told it the wrong thing to do.
Thank you in advance.
Bite me.
May 28 '07 #3
geoplab wrote:
>
I have this error message when compiling mx_init.c by linking libxml
library as follow:

gcc `xml2-config --cflags` -c mx_init.c `xml2-config --libs` -g -Wall
.... snip ...
>
How can I fix this error?
The -c parameter says to compile to object file only, do not link.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 28 '07 #4

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

Similar topics

0
by: Joonas Paalasmaa | last post by:
Hi, When compiling Sketch's streamfilter C extension the errors below are raised during linking. What could cause the errors? (Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98) Here are...
0
by: Henke | last post by:
Hi! I'm writing an app supporting different languages. I store error messages in a string resource files for each language. The resource files are added to the project. My problem is that I...
3
by: Rob F | last post by:
I am trying to compile a string class which was working before but subsequent attempts to make it more 'object orientated' (privatizing the member variables and implenting query functions) it...
1
by: webstuff | last post by:
Hi, I recently started getting the BSOD (Stop 0xC5 and others) when compiling my C# application in Visual Studio. I was convinced it was was hardware problems until i checked out the code on my...
0
by: Joakim | last post by:
Hi, my VC.NET 2003 IDE hangs for hours when compiling my ATL7-project. It seams to compile fine and starts linking. This look OK to. But right before the component registration ("Performing...
10
by: Christina N | last post by:
When compiling my ASP.Net application, VS puts the new DLL under the local cached directory 'VSWebCache' in stead of on the server. How can I make it save the DLL file on the server when compiling?...
2
by: etienne | last post by:
Hello, I'm trying to compile this C++ code with gcc 3.4.5 under Solaris/SPARC (from a complete application, the file is : FullLinkedList.hh) but the make fails (no problem when compiling under...
3
by: nick4ng | last post by:
If I have a templated constructor, there is a way to know, at compile time, the instance when compiling the destructor? To be clearer my problem is that I have a templated constructor that is...
4
by: Dean Slindee | last post by:
I have a project with many References to other projects of mine (data access layer projects, for instance). When I compile a data access layer project, the Reference in the parent project goes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...

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.