problem of compilation the library Libxml2 Hi,<br/> <br/> - I extract all the seven archive libxml2-2.7.3.win32, iconv-1.9.2.win32, zlib-1.2.3.win32, libxmlsec-1.2.11+.win32, libxslt-1.1.24.win32, xsldbg-3.1.7.win32 et openssl-0.9.8a.win32.<br/> <br/> - I put the three directory <em>include</em> , bin et <em>lib </em> of each seven archives under the three following directory <em>include</em> , <em>bin </em> et <em>lib </em> of Visual Stusio<br/> <br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\libxml<br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\bin<br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\lib<br/> <br/> - I added in the PATH ofvariable system:<br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\bin<br/> <br/> - I wrote in my program C a simple example giving in the site of LIBXML2 :<br/> <br/> <span style="color:#3333ff">#include &lt;stdio.h&gt;</span> <br style="color:#3333ff"> <span style="color:#3333ff">#include &lt;stdlib.h&gt;</span> <br style="color:#3333ff"> <span style="color:#3333ff">#include &lt;libxml/parser.h&gt;</span> <br style="color:#3333ff"> <span style="color:#3333ff"> </span> <br style="color:#3333ff"> <span style="color:#3333ff">int main() {</span> <br style="color:#3333ff"> <span style="color:#3333ff">    xmlDocPtr doc;</span> <br style="color:#3333ff"> <span style="color:#3333ff">    xmlNodePtr racine;</span> <br style="color:#3333ff"> <br style="color:#3333ff"> <span style="color:#3333ff">    // Ouverture du fichier XML</span> <br style="color:#3333ff"> <span style="color:#3333ff">    doc = xmlParseFile(&quot;catalogue.xml&quot;);</span> <br style="color:#3333ff"> <span style="color:#3333ff">    if (doc == NULL) {</span> <br style="color:#3333ff"> <span style="color:#3333ff">        fprintf(stderr, &quot;Document XML invalide\n&quot;);</span> <br style="color:#3333ff"> <span style="color:#3333ff">        return EXIT_FAILURE;</span> <br style="color:#3333ff"> <span style="color:#3333ff">    }</span> <br style="color:#3333ff"> <span style="color:#3333ff">    // Récupération de la racine</span> <br style="color:#3333ff"> <span style="color:#3333ff">    racine = xmlDocGetRootElement(doc);</span> <br style="color:#3333ff"> <span style="color:#3333ff">    if (racine == NULL) {</span> <br style="color:#3333ff"> <span style="color:#3333ff">        fprintf(stderr, &quot;Document XML vierge\n&quot;);</span> <br style="color:#3333ff"> <span style="color:#3333ff">        xmlFreeDoc(doc);</span> <br style="color:#3333ff"> <span style="color:#3333ff">        return EXIT_FAILURE;</span> <br style="color:#3333ff"> <span style="color:#3333ff">    }</span> <br style="color:#3333ff"> <span style="color:#3333ff">    printf(&quot;La racine du document est : %s\n&quot;, racine-&gt;name);</span> <br style="color:#3333ff"> <span style="color:#3333ff">    // Libération de la mémoire</span> <br style="color:#3333ff"> <span style="color:#3333ff">    xmlFreeDoc(doc);</span> <br style="color:#3333ff"> <br style="color:#3333ff"> <span style="color:#3333ff">    return EXIT_SUCCESS;</span> <br style="color:#3333ff"> <span style="color:#3333ff">}</span> <br/> <br/> After the compilation, I have the following message errors:<br/> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;------ Début de la génération : Projet : passage, Configuration : Debug Win32 ------</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;Édition des liens en cours...</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;main.obj : error LNK2019: symbole externe non résolu _xmlFreeDoc référencé dans la fonction _main</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;main.obj : error LNK2019: symbole externe non résolu _xmlDocGetRootElement référencé dans la fonction _main</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;main.obj : error LNK2019: symbole externe non résolu _xmlParseFile référencé dans la fonction _main</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;C:\ChGaLib\passage\Debug\passage.exe : fatal error LNK1120: 3 externes non résolus</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;Le journal de génération a été enregistré à l'emplacement &quot;file://c:\ChGaLib\passage\passage\Debug\BuildLog.htm&quot;</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;passage - 4 erreur(s), 0 avertissement(s)</span> <br style="color:#ff0000"> <span style="color:#ff0000">========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========</span> <br/> <br/> <br/> I will be very happy for your help.<br/> <br/> Best regards.<br/> <br/> <br/>© 2009 Microsoft Corporation. All rights reserved.Fri, 03 Jul 2009 09:17:04 Z79ee241d-a9f8-4d4a-8773-168951ef8cb7http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/79ee241d-a9f8-4d4a-8773-168951ef8cb7#79ee241d-a9f8-4d4a-8773-168951ef8cb7http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/79ee241d-a9f8-4d4a-8773-168951ef8cb7#79ee241d-a9f8-4d4a-8773-168951ef8cb7chabnasrihttp://social.msdn.microsoft.com/Profile/en-US/?user=chabnasriproblem of compilation the library Libxml2 Hi,<br/> <br/> - I extract all the seven archive libxml2-2.7.3.win32, iconv-1.9.2.win32, zlib-1.2.3.win32, libxmlsec-1.2.11+.win32, libxslt-1.1.24.win32, xsldbg-3.1.7.win32 et openssl-0.9.8a.win32.<br/> <br/> - I put the three directory <em>include</em> , bin et <em>lib </em> of each seven archives under the three following directory <em>include</em> , <em>bin </em> et <em>lib </em> of Visual Stusio<br/> <br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\libxml<br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\bin<br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\lib<br/> <br/> - I added in the PATH ofvariable system:<br/> C:\Program Files\Microsoft Visual Studio 9.0\VC\bin<br/> <br/> - I wrote in my program C a simple example giving in the site of LIBXML2 :<br/> <br/> <span style="color:#3333ff">#include &lt;stdio.h&gt;</span> <br style="color:#3333ff"> <span style="color:#3333ff">#include &lt;stdlib.h&gt;</span> <br style="color:#3333ff"> <span style="color:#3333ff">#include &lt;libxml/parser.h&gt;</span> <br style="color:#3333ff"> <span style="color:#3333ff"> </span> <br style="color:#3333ff"> <span style="color:#3333ff">int main() {</span> <br style="color:#3333ff"> <span style="color:#3333ff">    xmlDocPtr doc;</span> <br style="color:#3333ff"> <span style="color:#3333ff">    xmlNodePtr racine;</span> <br style="color:#3333ff"> <br style="color:#3333ff"> <span style="color:#3333ff">    // Ouverture du fichier XML</span> <br style="color:#3333ff"> <span style="color:#3333ff">    doc = xmlParseFile(&quot;catalogue.xml&quot;);</span> <br style="color:#3333ff"> <span style="color:#3333ff">    if (doc == NULL) {</span> <br style="color:#3333ff"> <span style="color:#3333ff">        fprintf(stderr, &quot;Document XML invalide\n&quot;);</span> <br style="color:#3333ff"> <span style="color:#3333ff">        return EXIT_FAILURE;</span> <br style="color:#3333ff"> <span style="color:#3333ff">    }</span> <br style="color:#3333ff"> <span style="color:#3333ff">    // Récupération de la racine</span> <br style="color:#3333ff"> <span style="color:#3333ff">    racine = xmlDocGetRootElement(doc);</span> <br style="color:#3333ff"> <span style="color:#3333ff">    if (racine == NULL) {</span> <br style="color:#3333ff"> <span style="color:#3333ff">        fprintf(stderr, &quot;Document XML vierge\n&quot;);</span> <br style="color:#3333ff"> <span style="color:#3333ff">        xmlFreeDoc(doc);</span> <br style="color:#3333ff"> <span style="color:#3333ff">        return EXIT_FAILURE;</span> <br style="color:#3333ff"> <span style="color:#3333ff">    }</span> <br style="color:#3333ff"> <span style="color:#3333ff">    printf(&quot;La racine du document est : %s\n&quot;, racine-&gt;name);</span> <br style="color:#3333ff"> <span style="color:#3333ff">    // Libération de la mémoire</span> <br style="color:#3333ff"> <span style="color:#3333ff">    xmlFreeDoc(doc);</span> <br style="color:#3333ff"> <br style="color:#3333ff"> <span style="color:#3333ff">    return EXIT_SUCCESS;</span> <br style="color:#3333ff"> <span style="color:#3333ff">}</span> <br/> <br/> After the compilation, I have the following message errors:<br/> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;------ Début de la génération : Projet : passage, Configuration : Debug Win32 ------</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;Édition des liens en cours...</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;main.obj : error LNK2019: symbole externe non résolu _xmlFreeDoc référencé dans la fonction _main</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;main.obj : error LNK2019: symbole externe non résolu _xmlDocGetRootElement référencé dans la fonction _main</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;main.obj : error LNK2019: symbole externe non résolu _xmlParseFile référencé dans la fonction _main</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;C:\ChGaLib\passage\Debug\passage.exe : fatal error LNK1120: 3 externes non résolus</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;Le journal de génération a été enregistré à l'emplacement &quot;file://c:\ChGaLib\passage\passage\Debug\BuildLog.htm&quot;</span> <br style="color:#ff0000"> <span style="color:#ff0000">1&gt;passage - 4 erreur(s), 0 avertissement(s)</span> <br style="color:#ff0000"> <span style="color:#ff0000">========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========</span> <br/> <br/> <br/> I will be very happy for your help.<br/> <br/> Best regards.<br/> <br/> <br/>Sat, 27 Jun 2009 07:28:41 Z2009-06-27T07:28:41Zhttp://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/79ee241d-a9f8-4d4a-8773-168951ef8cb7#971c0f44-3477-4363-bec7-b8d760e94b89http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/79ee241d-a9f8-4d4a-8773-168951ef8cb7#971c0f44-3477-4363-bec7-b8d760e94b89Rong-Chun Zhanghttp://social.msdn.microsoft.com/Profile/en-US/?user=Rong-Chun%20Zhangproblem of compilation the library Libxml2 <p>Hello,<br/><br/>Error LNK2019 indicates that undefined external symbol (<span class=parameter>symbol</span>) was found in your code. In your case, most likely, there are some library cannot be found when compiling the project. Please check that the each library you used is included in the Library Files. <br/><br/>More information<br/><a href="http://msdn.microsoft.com/en-us/library/799kze2z.aspx">http://msdn.microsoft.com/en-us/library/799kze2z.aspx</a><br/><a href="http://support.microsoft.com/kb/309801">http://support.microsoft.com/kb/309801</a><br/><br/>Since this forum is for Visual SourceSafe, question about VC++, I recommend you post on VC++ forum for better response.<br/><br/><a href="http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread">http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread</a><br/><br/>By the way, please also translate the error message to English when posting on VC++ forum.<br/><br/>Thanks,<br/>Rong-Chun Zhang</p><hr class="sig">Please mark the replies as answers if they help and unmark if they don't.<br/> <a href="http://cfx.codeplex.com/">Welcome to the All-In-One Code Framework</a>, a sample code project owned by the MSDN Forum Support team!Wed, 01 Jul 2009 10:25:08 Z2009-07-01T10:25:08Z