Boost errors

25 views
Skip to first unread message

Praveen C

unread,
Nov 14, 2017, 2:44:44 AM11/14/17
to Deal.II Googlegroup
Dear all

Using deal.II at edeb002dcc4bec713788c14, when I compile my application, I get boost errors which are attached. I am using bundled boost. deal.II compilation goes through, but my application does not compile.

Thanks
praveen
log.txt

Daniel Arndt

unread,
Nov 14, 2017, 3:14:23 AM11/14/17
to deal.II User Group
Praveen,

can you provide us with a minimal example showing the problem?
Since this problem doesn't appear when compiling the library, it is difficult to guess the cause.

Best,
Daniel

Praveen C

unread,
Nov 15, 2017, 1:54:29 AM11/15/17
to Deal. II Googlegroup
So it was an issue in my own code. I had these two lines

#define T0            0.80   // bottom wall temperature
#define T1            0.85   // top    wall temperature

and it looks like this conflicts with something in Boost. Renaming T0 and T1 to something else solved the problem.

Thanks
praveen

Wolfgang Bangerth

unread,
Nov 15, 2017, 9:01:56 AM11/15/17
to dea...@googlegroups.com
On 11/14/2017 11:54 PM, Praveen C wrote:
> So it was an issue in my own code. I had these two lines
>
> #define T0 0.80 // bottom wall temperature
> #define T1 0.85 // top wall temperature
>
> and it looks like this conflicts with something in Boost. Renaming T0 and T1
> to something else solved the problem.

One of the many reasons why using preprocessor #defines is not a good idea.
Make these regular variables:
const double T0 = 0.8;
This would likely have worked.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Uwe Köcher

unread,
Nov 15, 2017, 5:35:33 PM11/15/17
to deal.II User Group
Indeed,

One of the many reasons why using preprocessor #defines is not a good idea.
Make these regular variables:
   const double T0 = 0.8;
This would likely have worked.

or even better, make use of the dealii::ParameterHandler and corresponding input files,
iff you have the time for such an implementation...

Personally, I'll skipped this for a long time, currently I'm using it a lot. Its a good feeling
not to compile the application again for some input parameters. Its even better than to
overwrite preprocessor defines (which I also have done in the past).

Always be careful when including boost, at least in the past, they have put features into
the std namespace.

Best
  Uwe
Reply all
Reply to author
Forward
0 new messages