Opened 8 years ago
Closed 8 years ago
#10405 closed Bugs (fixed)
Problem building cpp_dec_float multiprecision example
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | multiprecision |
Version: | Boost 1.56.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Dear developer,
I would like to build the small example shown at:
But it fails to compile with MSVC 2008 on Windows 7:
1>Linking... 1>bmt.obj : error LNK2019: unresolved external symbol "class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1> cdecl boost::math::tgamma<struct boost::multiprecision::detail::expression<struct boost::multiprecision::detail::multiply_immediates,class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1>,class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1>,void,void> >(struct boost::multiprecision::detail::expression<struct boost::multiprecision::detail::multiply_immediates,class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1>,class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1>,void,void>)" (??$tgamma@U?$expression@Umultiply_immediates@detail@multiprecision@boost@@V?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@34@V534@XX@detail@multiprecision@boost@@@math@boost@@YA?AV?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@multiprecision@1@U?$expression@Umultiply_immediates@detail@multiprecision@boost@@V?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@34@V534@XX@detail@31@@Z) referenced in function _main 1>bmt.obj : error LNK2019: unresolved external symbol "class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1> cdecl boost::math::tgamma<class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1> >(class boost::multiprecision::number<class boost::multiprecision::backends::cpp_dec_float<100,int,void>,1>)" (??$tgamma@V?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@multiprecision@boost@@@math@boost@@YA?AV?$number@V?$cpp_dec_float@$0GE@HX@backends@multiprecision@boost@@$00@multiprecision@1@V231@@Z) referenced in function _main 1>D:\Damien\Programmation\boost-multiprecision-test\Debug\boost-multiprecision-test.exe : fatal error LNK1120: 2 unresolved externals
And I don't understand why since it should be a header-only lib. Any help would be highly appreciated. Best regards,
Change History (2)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ah, there's an error in the example: a missing #include, you need to add
To the top of the example, I'll fix the docs shortly.