QuantLib and .dll

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

QuantLib and .dll

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, 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<double,boost::math::policies::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::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<std::_Vector_val<std::_Simple_types<boost::math::students_t_distribution<double,boost::math::policies::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::math::policies::default_policy>>>>>,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,boost::_bi::bind_t<RealType,boost::_mfi::cmf0<RealType,boost::math::students_t_distribution<RealType,boost::math::policies::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::math::policies::default_policy>>>,boost::_bi::list1<boost::arg<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.
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib and .dll

Luigi Ballabio
What compiler are you using?


On Wed, May 3, 2017 at 2:24 PM Mario Marra <[hidden email]> wrote:
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.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib and .dll

Luigi Ballabio
Never mind, I see it's Visual Studio 2017.
Did you have problem compiling QuantLib itself?

Luigi


On Wed, May 10, 2017 at 5:20 PM Luigi Ballabio <[hidden email]> wrote:
What compiler are you using?


On Wed, May 3, 2017 at 2:24 PM Mario Marra <[hidden email]> wrote:
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.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users