[Dune] nullptr error gcc
Bernd Flemisch
bernd at iws.uni-stuttgart.de
Mon Jul 11 15:09:21 CEST 2016
Hi Feng,
you have to
#include "config.h"
from your top-level build directory, always should work within a Dune
module and use the CMake-based Dune buildsystem. See this for a good
introduction:
http://www.math.tu-dresden.de/~osander/research/sander-getting-started-with-dune.pdf
If you want to do it the hard way, you can start by manually setting
preprocessor variables like "-DHAVE_NULLPTR=1", but that's not recommended.
Kind regards
Bernd
On 07/11/2016 03:01 PM, Feng Xing wrote:
> Hello,
>
> I would like to look for a little help about my first code with dune,
> il contains one line in main(): cout<<“hello”<<endl;
> I got the following error when including "dune/common/nullptr.hh”:
>
> /usr/local/dune-2.4.1/include/dune/common/nullptr.hh:29:1: error:
> expected ';' after class definition
> } nullptr = {}; // and whose name is nullptr
> /usr/local/dune-2.4.1/include/dune/common/nullptr.hh:29:1: error:
> qualifiers can only be specified for objects and functions
> /usr/local/dune-2.4.1/include/dune/common/nullptr.hh:29:3: error:
> expected unqualified-id before 'nullptr'
> } nullptr = {}; // and whose name is nullptr
>
>
> Il seems that it’s from const obj dune_nullptr_t in nullptr.hh. I use
> GCC4.9 (or GCC5.3) with std=c++11 in mac. Dune version is 2.4.1.
>
> Thank you very much.
>
> Best regards,
>
> Feng Xing
> Postdoc INRIA France
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
--
_______________________________________________________________
Bernd Flemisch phone: +49 711 685 69162
IWS, Universität Stuttgart fax: +49 711 685 60430
Pfaffenwaldring 61 email: bernd at iws.uni-stuttgart.de
D-70569 Stuttgart url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20160711/40dc91c6/attachment.htm>
More information about the Dune
mailing list