From dclusin at enernoc.com Fri Nov 2 20:44:31 2007 From: dclusin at enernoc.com (Dan Clusin) Date: Fri, 2 Nov 2007 15:44:31 -0400 Subject: [Expat-discuss] Statically linking against expat libs Message-ID: Good day everyone, I'm trying to write a program that statically links against expat. The target platform I am writing for is an embedded arm board running embedded linux (using uClibc). When I compile my program using the vendor provided tool-chain (gcc variant targeting the arm platform) I get the following error: /usr/local/arm/3.4/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.3/../../.. /../arm-linux-uclibc/bin/ld: cannot find -l/home/dclusin/Development/obvius_libs/expat/lib/libexpat.a The libexpat.a archive does exist there. I have google searched for this particular problem, but haven't found any useful advice. Most of the static linking advice that I have seen doesn't pertain to expat, or doesn't solve my problem. I have configured the source for expat using the following options: ./configure --prefix=/home/dclusin/Development/obvius_libs/expat/ --host=arm-linux-uclibc CC=/usr/local/arm/3.4/bin/arm-linux-gcc LFLAGS=-s The relevant section of my makefile is as follows: CC=/usr/local/arm/3.4/bin/arm-linux-gcc CFLAGS= -O3 -Wall -c LFLAGS= -static OBVIUS_LIBS=/home/dclusin/Development/obvius_libs/ LIBRARIES=-l$(OBVIUS_LIBS)/expat/lib/libexpat.a #... #$(objects) is rather long so I left it out for clarity's sake. myApp: $(objects) $(CC) $(LFLAGS) $(LIBRARIES) -o myApp $(objects) Perhaps it could be because I mis-configured my source build of expat, or I have inadvertently screwed something up in my make file. Any ideas that you can offer are greatly appreciated. If you need more information, please don't hesitate to ask. I tried to provide everything I thought was pertinent with out giving you the kitchen sink. Regards, Daniel Clusin EnerNOC, Inc. (617)5328154 This email and any information disclosed in connection herewith, whether written or oral, is the property of EnerNOC, Inc. and is intended only for the person or entity to which it is addressed. This email may contain information that is privileged, confidential or otherwise protected from disclosure. Distributing or copying any information contained in this email to anyone other than the intended recipient is strictly prohibited. From webmaster at hartwork.org Fri Nov 2 21:51:45 2007 From: webmaster at hartwork.org (Sebastian Pipping) Date: Fri, 02 Nov 2007 21:51:45 +0100 Subject: [Expat-discuss] Statically linking against expat libs In-Reply-To: References: Message-ID: <472B8DE1.4040308@hartwork.org> Dan Clusin wrote: > /usr/local/arm/3.4/bin-ccache/../lib/gcc/arm-linux-uclibc/3.4.3/../../.. > /../arm-linux-uclibc/bin/ld: cannot find > -l/home/dclusin/Development/obvius_libs/expat/lib/libexpat.a With a little luck that's an easy one. Try replacing -l/home/dclusin/Development/obvius_libs/expat/lib/libexpat.a with -L/home/dclusin/Development/obvius_libs/expat/lib/ -lexpat I hope that solves the problem. Sebastian From zhwqiu at yahoo.com Thu Nov 8 18:08:15 2007 From: zhwqiu at yahoo.com (Zhongwei Qiu) Date: Thu, 8 Nov 2007 09:08:15 -0800 (PST) Subject: [Expat-discuss] thread safe? Message-ID: <218842.56925.qm@web50608.mail.re2.yahoo.com> Hello everyone, Is expat lib thread safe? I am trying to use it in QNX OS. Thanks, Zhongwei __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From swalker at bynari.net Thu Nov 8 23:07:05 2007 From: swalker at bynari.net (Shawn Walker) Date: Thu, 08 Nov 2007 16:07:05 -0600 Subject: [Expat-discuss] Merge two XML data with libexpat? Message-ID: <47338889.1020507@bynari.net> Has anybody used libexpat to merge two XML data into one? Or does somebody know of a good library to do that? Regards, Shawn From swalker at bynari.net Thu Nov 8 23:48:01 2007 From: swalker at bynari.net (Shawn Walker) Date: Thu, 08 Nov 2007 16:48:01 -0600 Subject: [Expat-discuss] Merge two XML data with libexpat? In-Reply-To: <20071108223604.6C65FA3BE4@pointsman.pointsman.de> References: <20071108223604.6C65FA3BE4@pointsman.pointsman.de> Message-ID: <47339221.70106@bynari.net> rolf at pointsman.de wrote: > On 8 Nov, Shawn Walker wrote: >> Has anybody used libexpat to merge two XML data into one? Or does >> somebody know of a good library to do that? > > "[T]o merge two XML data" mean exactly what? What I mean is that I have two XML files. I created a new XML file based on some data but I need to merge in the old XML file to merge in data that I don't know about that another application had put in the XML file. From nickmacd at gmail.com Fri Nov 9 00:09:55 2007 From: nickmacd at gmail.com (Nick MacDonald) Date: Thu, 8 Nov 2007 18:09:55 -0500 Subject: [Expat-discuss] Merge two XML data with libexpat? In-Reply-To: <47339221.70106@bynari.net> References: <20071108223604.6C65FA3BE4@pointsman.pointsman.de> <47339221.70106@bynari.net> Message-ID: There is no such thing as a correct way to merge two arbitrary XML files. You're talking about combining to completely self-sufficient entities into a third entity with some sort of intelligence. That's kinda like saying is there a tool to merge two books or two spreadsheets or two companies. (The tool is the human brain.) Each file should, in theory, have a schema, and the correct way to merge them would probably involve output according to a third schema. (Not that eXpat is a schema validating parser, but that's not really the point here.) There may well be existing tools that can do this... but its likely any tool would have to understand the content/context of each file to know how to merge it. Its not something I have ever heard of before... to me it sounds like you need a custom written tool. (Of course, if you haven't yet done a search on SourceForge on merge and XML then who knows what you might find.) eXpat may not even be your best choice... it sounds like you would need to read the entirety of one document into memory (which is more of a DOM parser model than a SAX parser model) and then add/insert the contents of the second one into the correct places and then write out a brand new document. In any case, hopefully your schema's are both very simple/straightforward and you can easily craft a special tool to solve your problem. Good luck, Nick On 11/8/07, Shawn Walker wrote: > rolf at pointsman.de wrote: > > On 8 Nov, Shawn Walker wrote: > >> Has anybody used libexpat to merge two XML data into one? Or does > >> somebody know of a good library to do that? > > > > "[T]o merge two XML data" mean exactly what? > > What I mean is that I have two XML files. I created a new XML file > based on some data but I need to merge in the old XML file to merge in > data that I don't know about that another application had put in the XML > file. From rolf at pointsman.de Thu Nov 8 23:36:01 2007 From: rolf at pointsman.de (rolf at pointsman.de) Date: Thu, 8 Nov 2007 23:36:01 +0100 (CET) Subject: [Expat-discuss] Merge two XML data with libexpat? In-Reply-To: <47338889.1020507@bynari.net> Message-ID: <20071108223604.6C65FA3BE4@pointsman.pointsman.de> On 8 Nov, Shawn Walker wrote: > Has anybody used libexpat to merge two XML data into one? Or does > somebody know of a good library to do that? "[T]o merge two XML data" mean exactly what? > > Regards, > Shawn > _______________________________________________ > Expat-discuss mailing list > Expat-discuss at libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss > From swalker at bynari.net Fri Nov 9 00:25:51 2007 From: swalker at bynari.net (Shawn Walker) Date: Thu, 08 Nov 2007 17:25:51 -0600 Subject: [Expat-discuss] Merge two XML data with libexpat? In-Reply-To: References: <20071108223604.6C65FA3BE4@pointsman.pointsman.de> <47339221.70106@bynari.net> Message-ID: <47339AFF.9090304@bynari.net> Nick MacDonald wrote: > There is no such thing as a correct way to merge two arbitrary XML > files. You're talking about combining to completely self-sufficient > entities into a third entity with some sort of intelligence. That's > kinda like saying is there a tool to merge two books or two > spreadsheets or two companies. (The tool is the human brain.) Each > file should, in theory, have a schema, and the correct way to merge > them would probably involve output according to a third schema. (Not > that eXpat is a schema validating parser, but that's not really the > point here.) That's why it's quite difficult for me to try to even come up with something to merge in two XML data since I have no idea what some other application would put in the XML file. > > There may well be existing tools that can do this... but its likely > any tool would have to understand the content/context of each file to > know how to merge it. Its not something I have ever heard of > before... to me it sounds like you need a custom written tool. (Of > course, if you haven't yet done a search on SourceForge on merge and > XML then who knows what you might find.) I have been looking on SourceForge and google, but either somebody has some information on using Microsoft APIs using VisualBasic or some DOM object. But, I need it in C or C++. > > eXpat may not even be your best choice... it sounds like you would > need to read the entirety of one document into memory (which is more > of a DOM parser model than a SAX parser model) and then add/insert the > contents of the second one into the correct places and then write out > a brand new document. > > In any case, hopefully your schema's are both very > simple/straightforward and you can easily craft a special tool to > solve your problem. It's rather simple, but I would have no idea if somebody else would decide to throw in a complex schema. > > Good luck, > Nick > > > On 11/8/07, Shawn Walker wrote: >> rolf at pointsman.de wrote: >>> On 8 Nov, Shawn Walker wrote: >>>> Has anybody used libexpat to merge two XML data into one? Or does >>>> somebody know of a good library to do that? >>> "[T]o merge two XML data" mean exactly what? >> What I mean is that I have two XML files. I created a new XML file >> based on some data but I need to merge in the old XML file to merge in >> data that I don't know about that another application had put in the XML >> file. From ali at mental.com Fri Nov 9 12:14:36 2007 From: ali at mental.com (Albrecht Fritzsche) Date: Fri, 09 Nov 2007 12:14:36 +0100 Subject: [Expat-discuss] Expat-discuss Digest, Vol 92, Issue 2 In-Reply-To: References: Message-ID: <4734411C.9040402@mental.com> expat-discuss-request at libexpat.org wrote: > Today's Topics: > > 1. thread safe? (Zhongwei Qiu) > > Message: 1 > Date: Thu, 8 Nov 2007 09:08:15 -0800 (PST) > From: Zhongwei Qiu > Subject: [Expat-discuss] thread safe? > To: expat-discuss at libexpat.org > Message-ID: <218842.56925.qm at web50608.mail.re2.yahoo.com> > Content-Type: text/plain; charset=iso-8859-1 > > Hello everyone, > > Is expat lib thread safe? I am trying to use it in QNX OS. > > Thanks, > Zhongwei In my usage of this term - yes, AFAIK it is. Since it does not use static data which might lead to conflicts when using multiple XML_ParserStruct "instances" you won't run into problems here. Shielding each XML_ParserStruct "instance" from concurrent calls is of course in the reponsibility of each application. Ali From boris at codesynthesis.com Wed Nov 14 08:36:27 2007 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed, 14 Nov 2007 07:36:27 +0000 (UTC) Subject: [Expat-discuss] expat parsing destructively? References: <13866-07183@sneakemail.com> Message-ID: Hi Mohun, Mohun Biswas writes: > I still say it would be really great if expat had an optional > destructive-parsing mode. For one thing it seems in keeping with the > spirit of SAX where you chew through the data once linearly and never > look back (except with your own state variables of course). One obvious problem with this approach is that the attribute values can contain entity references (e.g., &, etc) that need to be expanded. I suppose the parser could replace them in the original buffer and zap the gap by moving the rest of the value forward but, as you can see, it gets really messy. Boris -- Boris Kolpackov Code Synthesis Tools CC http://www.codesynthesis.com Open-Source, Cross-Platform C++ XML Data Binding From m_biswas at mailinator.com Wed Nov 14 16:13:12 2007 From: m_biswas at mailinator.com (Mohun Biswas) Date: Wed, 14 Nov 2007 10:13:12 -0500 Subject: [Expat-discuss] expat parsing destructively? In-Reply-To: References: <13866-07183@sneakemail.com> Message-ID: Boris Kolpackov wrote: > Mohun Biswas writes: > >> I still say it would be really great if expat had an optional >> destructive-parsing mode. For one thing it seems in keeping with the >> spirit of SAX where you chew through the data once linearly and never >> look back (except with your own state variables of course). > > One obvious problem with this approach is that the attribute values > can contain entity references (e.g., &, etc) that need to be > expanded. I suppose the parser could replace them in the original > buffer and zap the gap by moving the rest of the value forward but, > as you can see, it gets really messy. Boris, At first I didn't know what you were talking about because even currently the task of replacing standard entity references has to involve copying the attribute string into a buffer and using a state machine approach while walking through the buffer, and using an overlapping copy (e.g. 'strcpy(foo, foo+3)') to "zap the gap". I say this without looking at the code but it's hard to see how else it could work. This is easy because the standard entity references are all "shrinking", meaning '&' shrinks to '&'. And in that case the question of whether the buffer being operated on lives on the stack or the heap or within the document seems unimportant. However, when I realize that XML allows for custom entity references, such as a ©right; which expands to a potentially longer string, I see that things do get messy. Not that this couldn't be solved as you describe but there may well be other similar issues. In any case I don't have the cycles nor the expertise to contribute work to the idea and it would be poor form to complain without offering to help out, so I'll let it go. I've gotten my parsing code working fine; it's just not quite as elegant in terms of memory management as one might wish. Thanks, MB From crazybob at crazybob.org Fri Nov 16 00:29:42 2007 From: crazybob at crazybob.org (Bob Lee) Date: Thu, 15 Nov 2007 15:29:42 -0800 Subject: [Expat-discuss] Can I get the prefix from an element handler? Message-ID: If I'm using a namespace-aware expat parser, is there any way for me to get the original prefix from the element handler? For example, if I want to implement SAX on top of expat, where can I get the qName? Right now, it looks like I might have to extend Expat. Bob From fdrake at acm.org Fri Nov 16 03:36:40 2007 From: fdrake at acm.org (Fred Drake) Date: Thu, 15 Nov 2007 21:36:40 -0500 Subject: [Expat-discuss] Can I get the prefix from an element handler? In-Reply-To: References: Message-ID: On Nov 15, 2007, at 6:29 PM, Bob Lee wrote: > Right now, it looks like I might have to extend Expat. No need; it'll do everything you need. You want to look at the documentation for the XML_SetReturnNSTriplet function. -Fred -- Fred Drake From crazybob at crazybob.org Fri Nov 16 03:45:49 2007 From: crazybob at crazybob.org (Bob Lee) Date: Thu, 15 Nov 2007 18:45:49 -0800 Subject: [Expat-discuss] Can I get the prefix from an element handler? In-Reply-To: References: Message-ID: Perfect! Thanks, Fred. On Nov 15, 2007 6:36 PM, Fred Drake wrote: > On Nov 15, 2007, at 6:29 PM, Bob Lee wrote: > > Right now, it looks like I might have to extend Expat. > > No need; it'll do everything you need. You want to look at the > documentation for the XML_SetReturnNSTriplet function. > > > -Fred > > -- > Fred Drake > > > > > From alforan at tin.it Tue Nov 20 09:49:26 2007 From: alforan at tin.it (Alfonso) Date: Tue, 20 Nov 2007 09:49:26 +0100 Subject: [Expat-discuss] Hello and question about unknown encoding handler Message-ID: <47429F96.7030606@tin.it> Hi expat gurus. I am Alfonso from Italy and I ported expat to MorphOS/Amiga (see alfie.altervista.org), while writing a RSS client. My problem is this: let's say I am downloading from http://bash.org.ru/rss. - it sends me a xml file encoded in windows-1251 - expat calls my unknownEncodingHandler - in the above handler I know how to handle with that encoding (I am using lib codesets for that porpouse); so I set the map this way: --- /* codeset=findcodeset() */ for (i = 0; i<256; i++) { int l = codeset->table[i].utf8[0]; if (l==1) info->map[i] = i; else info->map[i] = -l; } info->convert = convert; info->data = codeset; --- - now for any char to be translated to UTF-8, convert is called: --- int convert(void *data, const char *s) { struct codeset *codeset = (struct codeset *)data; return codeset->table[*s].ucs4 ; } --- I thought that I should return the UTF-8 unsigned int of the char. But it doesn't work, for the simple reason, any windows-1251 chars is just a single char and doesn't start any sequences. That results in expat considering any "strange" char as starting a sequence of 2 or 3 chars, while it is always a single one. Is there a solution for the above problem? What should I do in the unknownEncoding handler or in convert()? I am sure there is something I don't get :P Thank for your help. Ciao. Alfonso From abhishek.v at tcs.com Tue Nov 27 12:04:43 2007 From: abhishek.v at tcs.com (abhishek.v at tcs.com) Date: Tue, 27 Nov 2007 16:34:43 +0530 Subject: [Expat-discuss] Linking error Message-ID: Hi. I m using graphml.cpp and graphml.hpp of boost lib which make use of expat . I m working on Windows-Xp so i have downloaded expat and also extracted it to a particular location. when trying to compile the program i m getting following linking error. make.exe -f "C:\Dev-Cpp\graphml\Makefile.win" all g++.exe -D__DEBUG__ -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/graphml" -I"C:/SRLGrp/BoostLib/expat-2.0.1/lib" -I"C:/SRLGrp/BoostLib/boost_1_34_1" -I"C:/SRLGrp/BoostLib/expat-2.0.1" -pg -g3 g++.exe -D__DEBUG__ -c ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp -o ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/graphml" -I"C:/SRLGrp/BoostLib/expat-2.0.1/lib" -I"C:/SRLGrp/BoostLib/boost_1_34_1" -I"C:/SRLGrp/BoostLib/expat-2.0.1" -pg -g3 g++.exe -D__DEBUG__ main.o ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o -o "graphml.exe" -L"C:/Dev-Cpp/lib" -lgmon -pg -g3 ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x73): In function `ZN5boost22undirected_graph_errorD0Ev': C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: undefined reference to `XML_ParserCreateNS' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x91):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: undefined reference to `XML_SetElementHandler' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0xa4):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: undefined reference to `XML_SetCharacterDataHandler' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0xb6):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: undefined reference to `XML_SetUserData' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x12b): In function `ZN5boost12read_graphmlERSiRNS_12mutate_graphE': C:/Dev-Cpp/graphml/../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:349: undefined reference to `XML_Parse' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x1af):C:/Dev-Cpp/graphml/../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: undefined reference to `XML_GetCurrentColumnNumber' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x1c0):C:/Dev-Cpp/graphml/../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: undefined reference to `XML_GetCurrentLineNumber' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x1d1):C:/Dev-Cpp/graphml/../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: undefined reference to `XML_GetErrorCode' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x1d9):C:/Dev-Cpp/graphml/../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: undefined reference to `XML_ErrorString' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x259): In function `Z41__static_initialization_and_destruction_0ii': C:/Dev-Cpp/include/c++/3.4.2/iostream:77: undefined reference to `XML_ParserFree' ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream >&)]+0x3c9): In function `GLOBAL__D__ZN5boost12read_graphmlERSiRNS_12mutate_graphE': C:/Dev-Cpp/graphml/../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:355: undefined reference to `XML_ParserFree' collect2: ld returned 1 exit status Kindly help Thanks Abhishek Vyas =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you From dbn.lists at gmail.com Tue Nov 27 20:26:32 2007 From: dbn.lists at gmail.com (Dan Nicholson) Date: Tue, 27 Nov 2007 11:26:32 -0800 Subject: [Expat-discuss] Linking error In-Reply-To: References: Message-ID: <91705d080711271126h655aa726m83547b4342a5f8b9@mail.gmail.com> On Nov 27, 2007 3:04 AM, wrote: > > g++.exe -D__DEBUG__ main.o > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o -o > "graphml.exe" -L"C:/Dev-Cpp/lib" -lgmon -pg -g3 > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(.text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream std::char_traits >&)]+0x73): In function > `ZN5boost22undirected_graph_errorD0Ev': > C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: undefined > reference to `XML_ParserCreateNS' You need to actually link the program with -lexpat. I don't know how this build is setup, but it doesn't seem to know about your expat installation. This is really more of a question for the boost people. http://www.boost.org/more/getting_started/windows.html#in-case-of-build-errors -- Dan From 11mjazbdg02 at sneakemail.com Tue Nov 27 12:31:06 2007 From: 11mjazbdg02 at sneakemail.com (Mark) Date: Tue, 27 Nov 2007 11:31:06 -0000 Subject: [Expat-discuss] Linking error In-Reply-To: References: Message-ID: <12961-54130@sneakemail.com> > g++.exe -D__DEBUG__ main.o > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o -o > "graphml.exe" -L"C:/Dev-Cpp/lib" -lgmon -pg -g3 You need to link in expat. Modify this line in your makefile. Mark. From abhishek.v at tcs.com Wed Nov 28 12:53:48 2007 From: abhishek.v at tcs.com (abhishek.v at tcs.com) Date: Wed, 28 Nov 2007 17:23:48 +0530 Subject: [Expat-discuss] Linking error In-Reply-To: Message-ID: Hi Nick As per ur suggestion i have included the repective obj files in the project now. And now i m getting the following error. Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\graphml\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\graphml\Makefile.win" all g++.exe -D__DEBUG__ main.o ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o -o "graphml.exe" -L"C:/Dev-Cpp/lib" -L"C:/SRLGrp/BoostLib/expat-2.0.1/lib" ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmlparse.obj ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmlrole.obj ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmltok.obj ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmltok_impl.obj ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug/xmltok_ns.obj ../../SRLGrp/BoostLib/expat-2.0.1/win32/bin/Debug/libexpat.lib -lgmon -pg -g3 Info: resolving __iob by linking to __imp___iob (auto-import) ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj(.text[_main]+0x0): In function `main': c:\srlgrp\boostlib: multiple definition of `main' main.o(.text+0x10a):C:/Dev-Cpp/graphml/main.cpp:7: first defined here ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj(.debug$S+0x37d):C:\SRLGrp\BoostLib: variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. ../../SRLGrp/BoostLib/expat-2.0.1/win32/tmp/Debug-elements/elements.obj(.text[_main]+0xf3): In function `main': c:\srlgrp\boostlib:13: variable '_iob' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details. Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized Warning: .drectve `-editandcontinue ' unrecognized Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized Warning: .drectve `-editandcontinue ' unrecognized Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized Warning: .drectve `-editandcontinue ' unrecognized Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized Warning: .drectve `-editandcontinue ' unrecognized Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized Warning: .drectve `-editandcontinue ' unrecognized Warning: .drectve `-defaultlib:LIBCMTD ' unrecognized Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized Warning: .drectve `-editandcontinue ' unrecognized fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' fu000002.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o(.idata$4+0x0): undefined reference to `_nm___iob' collect2: ld returned 1 exit status make.exe: *** [graphml.exe] Error 1 Execution terminated Kindly help... Thanks Abhishek Vyas "Nick MacDonald" wrote on 11/27/2007 09:21:01 PM: > I know nothing about the add on Boost libraries you're trying to > compile, but it almost looks to me, from your error messages, that you > either didn't compile the eXpat library, or include a reference to the > compiled code into the Boost Makefile, so when the linker is looking > to resolve for eXpat externals its not finding anything. I would > expect to see some sort of explicit reference to eXpat on your linking > command line, which I don't believe is there. > > I'd almost expect something like -L {dir containing expat} -l expat > (if you had an expat.a) somewhere, or else an explicit mention of the > three expat *.o files... xmltok.o xmlrole.o and xmlparse.o > > But the first step would be to confirm you have compiled eXpat and > have any of its .o or .a files available in the directories mentioned > in your Makefile. > > Good luck, > Nick > > > On Nov 27, 2007 6:04 AM, wrote: > > I m using graphml.cpp and graphml.hpp of boost lib which make use of expat > > . > > I m working on Windows-Xp so i have downloaded expat and also extracted it > > to a > > particular location. when trying to compile the program i m getting > > following linking error. > > > > make.exe -f "C:\Dev-Cpp\graphml\Makefile.win" all > > g++.exe -D__DEBUG__ -c main.cpp -o main.o > > -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" > > -I"C:/Dev-Cpp/include/c++/3.4.2/backward" > > -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" > > -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/graphml" > > -I"C:/SRLGrp/BoostLib/expat-2.0.1/lib" -I"C:/SRLGrp/BoostLib/boost_1_34_1" > > -I"C:/SRLGrp/BoostLib/expat-2.0.1" -pg -g3 > > > > g++.exe -D__DEBUG__ -c > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp -o > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o > > -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" > > -I"C:/Dev-Cpp/include/c++/3.4.2/backward" > > -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" > > -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/graphml" > > -I"C:/SRLGrp/BoostLib/expat-2.0.1/lib" -I"C:/SRLGrp/BoostLib/boost_1_34_1" > > -I"C:/SRLGrp/BoostLib/expat-2.0.1" -pg -g3 > > > > g++.exe -D__DEBUG__ main.o > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o -o > > "graphml.exe" -L"C:/Dev-Cpp/lib" -lgmon -pg -g3 > > > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits >&)]+0x73): In function > > `ZN5boost22undirected_graph_errorD0Ev': > > C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: undefined > > reference to `XML_ParserCreateNS' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits > > >&)]+0x91):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: > > undefined reference to `XML_SetElementHandler' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits > > >&)]+0xa4):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: > > undefined reference to `XML_SetCharacterDataHandler' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits > > >&)]+0xb6):C:/SRLGrp/BoostLib/boost_1_34_1/boost/graph/graphviz.hpp: > > undefined reference to `XML_SetUserData' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits >&)]+0x12b): In function > > `ZN5boost12read_graphmlERSiRNS_12mutate_graphE': > > C:/Dev-Cpp/graphml/../.. > /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:349: > > undefined reference to `XML_Parse' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits > > >&)]+0x1af):C:/Dev-Cpp/graphml/../.. > /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: > > undefined reference to `XML_GetCurrentColumnNumber' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits > > >&)]+0x1c0):C:/Dev-Cpp/graphml/../.. > /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: > > undefined reference to `XML_GetCurrentLineNumber' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits > > >&)]+0x1d1):C:/Dev-Cpp/graphml/../.. > /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: > > undefined reference to `XML_GetErrorCode' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits > > >&)]+0x1d9):C:/Dev-Cpp/graphml/../.. > /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:351: > > undefined reference to `XML_ErrorString' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits >&)]+0x259): In function > > `Z41__static_initialization_and_destruction_0ii': > > C:/Dev-Cpp/include/c++/3.4.2/iostream:77: undefined reference to > > `XML_ParserFree' > > ../../SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.o(. > text$_ZN14graphml_reader3runERSi[graphml_reader::run(std::basic_istream > std::char_traits >&)]+0x3c9): In function > > `GLOBAL__D__ZN5boost12read_graphmlERSiRNS_12mutate_graphE': > > C:/Dev-Cpp/graphml/../.. > /SRLGrp/BoostLib/boost_1_34_1/libs/graph/src/graphml.cpp:355: > > undefined reference to `XML_ParserFree' > > collect2: ld returned 1 exit status > ForwardSourceID:NT0004D0CE =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you From magicduanzq at gmail.com Fri Nov 23 14:00:46 2007 From: magicduanzq at gmail.com (Duan,ZhiQiang) Date: Fri, 23 Nov 2007 13:00:46 -0000 Subject: [Expat-discuss] Help! HP-UX compile failed.(ld: Unknown input file type: "./.libs/libexpat.so" Fatal error. *** Error exit code 1) Message-ID: <002601c82dd0$dded8f00$391ca8c0@DELL01> Hi I use the expat in my project. I can compile the expat 2.0.1 in Linux, But when I try to compile it in HP-UX rx2620 11.23, I get the following error. (ld: Unknown input file type: "./.libs/libexpat.so" Fatal error. *** Error exit code 1) Do somebody know why? Thanks. Duan