Mailinglist Archive: opensuse-buildservice (233 mails)

< Previous Next >
Re: [opensuse-buildservice] 'ass ert’ was not declared in this scope
  • From: Marcus Meissner <meissner@xxxxxxx>
  • Date: Sat, 12 May 2007 16:06:02 +0200
  • Message-id: <20070512140602.GA26392@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References