473,700 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3840
In article <11************ **********@p77g 2000hsh.googleg roups.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.securityfoc us.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
4927
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 the occurrences of FilterType that may be relevant: ------- C:\sketch\sketch-0.7.12\Filter\filterobj.c: 949: PyTypeObject FilterType = {
0
1408
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 have to use the assembly linker (AL) to link my string resources to the app.resources.dll file. Can't this be done automaticly when compiling the application in Visual studio 2003? Thanks in advance!
3
2194
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 refuses to compile in Visual C++. Here is the code: http://www.rbf.org.uk/xstring.h When compiling I get the following: \xstring.h(87) : error C2662: 'query_length' : cannot convert 'this'
1
3033
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 laptop and immediately started getting blue screens again (Stop 0x8E) when compiling. This is far too big a coincidence for me to believe that both computers are going wrong independently. Has any one else ever seen this? I'm getting quite...
0
1330
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 registration" below) it hangs for hours. After this it looks to be finished with no errors. But I looked in the generated BuildLog.htm file and it looks like regsvr32 returns some error. The environment reports "error PRJ0019", but I don't think
10
2190
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? I have opened the source code project through 'File - Open - Open project from web..' Best regards, Christina
2
2113
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 ubuntu/x86) : (from line 330 to 481) /***************************************************************************** * ITERATOR SECTION - INNER CLASSES
3
1717
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 empty for particular arguments. I need to have an empty destructor in this case as well. Is it possible? I should add that for other reasons I can not have a templated class.
4
1394
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 stale (yellow icon) when the parent project is concurrently open (two VS instances). I have been manually deleting the stale Reference and re-adding the Reference in the concurrently open parent project. Is this manual process necessary, or will...
0
8725
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
8644
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9214
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...
1
8970
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
7807
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5902
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
4403
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2027
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.