Discussion:
[Quantlib-users] QuantLib and .dll
Mario Marra
2017-05-03 12:23:05 UTC
Permalink
Hi guys,

I am trying to create a .dll file to use QuantLib library on Excel. When I
do not put the QuantLib and Boost references, it works. When I do put them,
however, I get a bunch of errors. I am including the following references:

#include <ql/quantlib.hpp>
# include <vector>
#include <boost/timer.hpp>
#include <iostream>
#include <iomanip>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>


I get the errors while building from the "algorithm" file:



c:\program files (x86)\microsoft visual
studio\2017\community\vc\tools\msvc\14.10.25017\include\algorithm(961):
note: see reference to function template instantiation '_OutIt
std::_Transform_unchecked<boost::math::students_t_distribution&lt;double,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>*,int*,_Fn1>(_InIt,_InIt,_OutIt,_Fn1
&)' being compiled


c:\program files (x86)\microsoft visual
studio\2017\community\vc\tools\msvc\14.10.25017\include\algorithm(971):
note: see reference to function template instantiation '_OutIt
std::_Transform_no_deprecate<_InIt,_OutIt,_Fn1>(_InIt,_InIt,_OutIt,_Fn1 &)'
being compiled



Also I get errors from ql files:

c:\users\mmarra\desktop\c++quanlib\quantlib-1.9.2\ql\experimental\math\tcopulapolicy.hpp(80):
note: see reference to function template instantiation '_OutIt
std::transform<std::_Vector_iterator&lt;std::_Vector_val&lt;std::_Simple_types&lt;boost::math::students_t_distribution&lt;double,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>>>>,std::_Vector_iterator<std::_Vector_val&lt;std::_Simple_types&lt;_Ty>>>,boost::_bi::bind_t<RealType,boost::_mfi::cmf0&lt;RealType,boost::math::students_t_distribution&lt;RealType,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>>,boost::_bi::list1<boost::arg&lt;1>>>>(_InIt,_InIt,_OutIt,_Fn1)'
being compiled



Finally, I get the following final error "... .lib : fatal error LNK1120: 1
unresolved externals". What could it be?

Thank you in advance.



--
View this message in context: http://quantlib.10058.n7.nabble.com/QuantLib-and-dll-tp18240.html
Sent from the quantlib-users mailing list archive at Nabble.com.
Luigi Ballabio
2017-05-10 15:20:45 UTC
Permalink
What compiler are you using?
Post by Mario Marra
Hi guys,
I am trying to create a .dll file to use QuantLib library on Excel. When I
do not put the QuantLib and Boost references, it works. When I do put them,
#include <ql/quantlib.hpp>
# include <vector>
#include <boost/timer.hpp>
#include <iostream>
#include <iomanip>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
c:\program files (x86)\microsoft visual
note: see reference to function template instantiation '_OutIt
std::_Transform_unchecked<boost::math::students_t_distribution&lt;double,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>*,int*,_Fn1>(_InIt,_InIt,_OutIt,_Fn1
&)' being compiled
c:\program files (x86)\microsoft visual
note: see reference to function template instantiation '_OutIt
std::_Transform_no_deprecate<_InIt,_OutIt,_Fn1>(_InIt,_InIt,_OutIt,_Fn1 &)'
being compiled
note: see reference to function template instantiation '_OutIt
std::transform<std::_Vector_iterator&lt;std::_Vector_val&lt;std::_Simple_types&lt;boost::math::students_t_distribution&lt;double,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>>>>,std::_Vector_iterator<std::_Vector_val&lt;std::_Simple_types&lt;_Ty>>>,boost::_bi::bind_t<RealType,boost::_mfi::cmf0&lt;RealType,boost::math::students_t_distribution&lt;RealType,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>>,boost::_bi::list1<boost::arg&lt;1>>>>(_InIt,_InIt,_OutIt,_Fn1)'
being compiled
Finally, I get the following final error "... .lib : fatal error LNK1120: 1
unresolved externals". What could it be?
Thank you in advance.
--
http://quantlib.10058.n7.nabble.com/QuantLib-and-dll-tp18240.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Luigi Ballabio
2017-05-10 15:21:43 UTC
Permalink
Never mind, I see it's Visual Studio 2017.
Did you have problem compiling QuantLib itself?

Luigi
Post by Luigi Ballabio
What compiler are you using?
Post by Mario Marra
Hi guys,
I am trying to create a .dll file to use QuantLib library on Excel. When I
do not put the QuantLib and Boost references, it works. When I do put them,
#include <ql/quantlib.hpp>
# include <vector>
#include <boost/timer.hpp>
#include <iostream>
#include <iomanip>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
c:\program files (x86)\microsoft visual
note: see reference to function template instantiation '_OutIt
std::_Transform_unchecked<boost::math::students_t_distribution&lt;double,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>*,int*,_Fn1>(_InIt,_InIt,_OutIt,_Fn1
&)' being compiled
c:\program files (x86)\microsoft visual
note: see reference to function template instantiation '_OutIt
std::_Transform_no_deprecate<_InIt,_OutIt,_Fn1>(_InIt,_InIt,_OutIt,_Fn1 &)'
being compiled
note: see reference to function template instantiation '_OutIt
std::transform<std::_Vector_iterator&lt;std::_Vector_val&lt;std::_Simple_types&lt;boost::math::students_t_distribution&lt;double,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>>>>,std::_Vector_iterator<std::_Vector_val&lt;std::_Simple_types&lt;_Ty>>>,boost::_bi::bind_t<RealType,boost::_mfi::cmf0&lt;RealType,boost::math::students_t_distribution&lt;RealType,boost::math::policies::policy&lt;boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy,boost::math::policies::default_policy>>>,boost::_bi::list1<boost::arg&lt;1>>>>(_InIt,_InIt,_OutIt,_Fn1)'
being compiled
Finally, I get the following final error "... .lib : fatal error LNK1120: 1
unresolved externals". What could it be?
Thank you in advance.
--
http://quantlib.10058.n7.nabble.com/QuantLib-and-dll-tp18240.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Loading...