2

I used to installer from http://www.boostpro.com/download/ to build boost and would like to use some of the math functions. Something like this:

Plm[l][m] = boost::math::legendre_p(l,m,cosine);

Naturally, I included:

#include <boost/math/special_functions/spherical_harmonic.hpp>

And added the path to boost to my additional (boost\boost) include directories and the path to the lib (boost\lib) to the additional linker directories (VS2008). I'm getting some compilation errors I can't seem to figure out the cause:

Error 6 error C2955: 'boost::mpl::if_' : use of class template requires template argument list D:\work\multipoles\Project\boost\boost\math\policies\policy.hpp 724

Error 2 error C2825: 'Policy': must be a class or namespace when followed by '::' D:\work\multipoles\Project\boost\boost\math\policies\policy.hpp 724

Error 4 error C2146: syntax error : missing ',' before identifier 'promote_double_type' D:\work\multipoles\Project\boost\boost\math\policies\policy.hpp 724

Error 5 error C2065: 'promote_double_type' : undeclared identifier D:\work\multipoles\Project\boost\boost\math\policies\policy.hpp 724

Error 3 error C2039: 'promote_double_type' : is not a member of '`global namespace'' D:\work\multipoles\Project\boost\boost\math\policies\policy.hpp 724

Any pointers would be much appreciated!

5
  • I know that these kind of problems can be caused by a missing ';' somewhere. However, I get the same compilation issues when I include boost on the first line of the file...
    – Matthias
    Apr 7, 2011 at 21:57
  • Can you show us the code you're compiling?
    – GManNickG
    Apr 8, 2011 at 4:42
  • sure thing: This is the file I call the boost function from pastebin.com/iZQ9neBP. These are the included headers, just to be save: pastebin.com/e3Q2w1fA, pastebin.com/LqpU2eAp
    – Matthias
    Apr 8, 2011 at 9:54
  • Shouldn't you include boost libraries using angle brackets quotes instead of quotes ? (Or I missing something ?)
    – cybevnm
    Apr 8, 2011 at 17:10
  • tried both (same compilation errors), but thx ;)
    – Matthias
    Apr 8, 2011 at 17:17

1 Answer 1

1

Alright, this was though one. In my code, l and m are unsigned. But there is only an overload for legendre_p(int,int,T). Thus, my function call is mapped to legendre_p(int,T,&policy) (or so I think).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.