[opensuse-buildservice] 'assert’ was not declared in this scope
Does soneone know, what can be done to prevent or solve the error below: xml.cpp: In member function ‘int xml::push_parser_context::parse(char*, int)’: xml.cpp:283: error: ‘assert’ was not declared in this scope make[2]: *** [xml.o] Fout 1 The file to be compiled xml.cpp: ......... extern "C" { #include <libxml/parser.h> #include <libxml/tree.h> #include <libxml/relaxng.h> } namespace xml { ..................... 280 if (context_ == 0) 281 { 282 context_ = xmlCreatePushParserCtxt(handler_, data_, buffer, size, file name_); 283 assert(context_ != 0); 284 return 0; 285 } 286 else 287 return xmlParseChunk(context_, buffer, size, size == 0); 288 } Commenting out 'assert' results in a succesful compile. -- TIA, Richard Bos We are borrowing the world of our children, It is not inherited from our parents. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Sat, May 12, 2007 at 02:49:09PM +0200, Richard Bos wrote:
Does soneone know, what can be done to prevent or solve the error below: xml.cpp: In member function ‘int xml::push_parser_context::parse(char*, int)’: xml.cpp:283: error: ‘assert’ was not declared in this scope make[2]: *** [xml.o] Fout 1
The file to be compiled xml.cpp: ......... extern "C" { #include <libxml/parser.h> #include <libxml/tree.h> #include <libxml/relaxng.h> }
namespace xml { ..................... 280 if (context_ == 0) 281 { 282 context_ = xmlCreatePushParserCtxt(handler_, data_, buffer, size, file name_); 283 assert(context_ != 0); 284 return 0; 285 } 286 else 287 return xmlParseChunk(context_, buffer, size, size == 0); 288 }
Commenting out 'assert' results in a succesful compile.
Add: #include <assert.h> Ciao, Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Marcus Meissner
-
Richard Bos