[xml] libxml2 linker errors in Visual Studio 2010
Good morning, Unfortunately I'm getting linker errors in Visual Studio 2010. I downloaded and extracted your latest windows libxml to C:\libraries\LibXML2 and extracted iconv-1.9.2.win32.zip to that same directory. I set additional include directories as C:\libraries\LibXML2\include, added that and C:\libraries\LibXML2\lib to Include directories and Library directories in the VC++ tab. Unfortunately I still get the following: 1-- Build started: Project: XML analysis, Configuration: Release Win32 -- 1Build started 10/13/2011 4:23:48 AM. 1InitializeBuildStatus: 1 Touching Release\XML analysis.unsuccessfulbuild. 1ClCompile: 1 All outputs are up-to-date. 1LINK : fatal error LNK1561: entry point must be defined 1 1Build FAILED. 1 1Time Elapsed 00:00:00.11 == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == How can I get libxml to work? Thanks for all suggestions, Alec Taylor PS: Giving me the gcc args may help me debug this, so feel free to provide if you're not familiar with VisualStudio. CodeBlocks is another IDE I don't mind using. ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] libxml2 linker errors in Visual Studio 2010
* Alec Taylor wrote: 1LINK : fatal error LNK1561: entry point must be defined http://msdn.microsoft.com/en-us/library/ky737ya4(v=VS.100).aspx: The linker did not find an entry point. You may have intended to link as a DLL, in which case you should link with the /DLL option. You may have also forgotten to specify the name of the entry point; link with the /ENTRY option. Otherwise, you should include a main, wmain, WinMain, or wMain function in your code. That seems pretty clear. -- Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] libxml2 linker errors in Visual Studio 2010
Thanks Bjoern, but I still can't figure out how to link it properly. I'm just trying to compile the example program: #include libxml/xmlreader.h void processNode(xmlTextReaderPtr reader) { /* handling of a node in the tree */ } int streamFile(char *filename) { xmlTextReaderPtr reader; int ret; reader = xmlNewTextReaderFilename(filename); if (reader != NULL) { ret = xmlTextReaderRead(reader); while (ret == 1) { processNode(reader); ret = xmlTextReaderRead(reader); } xmlFreeTextReader(reader); if (ret != 0) { printf(%s : failed to parse\n, filename); } } else { printf(Unable to open %s\n, filename); } } My linker additional dependencies are: kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;C:\libraries\LibXML2\lib\iconv.lib;C:\libraries\LibXML2\lib\iconv_a.lib;C:\libraries\LibXML2\lib\libxml2.lib;C:\libraries\LibXML2\lib\libxml2_a.lib;C:\libraries\LibXML2\lib\libxml2_a_dll.lib;%(AdditionalDependencies) Please tell me how to get this working. Thanks for all suggestions, Alec Taylor On Thu, Oct 13, 2011 at 11:13 AM, Bjoern Hoehrmann derhoe...@gmx.net wrote: * Alec Taylor wrote: 1LINK : fatal error LNK1561: entry point must be defined http://msdn.microsoft.com/en-us/library/ky737ya4(v=VS.100).aspx: The linker did not find an entry point. You may have intended to link as a DLL, in which case you should link with the /DLL option. You may have also forgotten to specify the name of the entry point; link with the /ENTRY option. Otherwise, you should include a main, wmain, WinMain, or wMain function in your code. That seems pretty clear. -- Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] libxml2 linker errors in Visual Studio 2010
* Alec Taylor wrote: Thanks Bjoern, but I still can't figure out how to link it properly. http://en.wikipedia.org/wiki/Main_function#C_and_C.2B.2B -- Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml
Re: [xml] libxml2 linker errors in Visual Studio 2010
xD On Thu, Oct 13, 2011 at 12:19 PM, Bjoern Hoehrmann derhoe...@gmx.net wrote: * Alec Taylor wrote: Thanks Bjoern, but I still can't figure out how to link it properly. http://en.wikipedia.org/wiki/Main_function#C_and_C.2B.2B -- Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml