Re: How to load utilities.hpp in a self-built project
Posted by
Luigi Ballabio on
Feb 28, 2017; 2:21pm
URL: http://quantlib.414.s1.nabble.com/How-to-load-utilities-hpp-in-a-self-built-project-tp18108p18125.html
Hi,
I meant option 3. The errors you're getting mean that you also have to link the Boost unit-test framework to your project. However, I don't advise that, since it might try to provide its own main() instead of yours.
The point is, both utilities.hpp and the test cases in test-suite are pretty much coupled to the Boost test-suite framework. If you want to create an application, you're probably better off steering away from it. If there is any code in the test cases or the utilities that you want to reuse, I suggest you copy it instead and replace Boost.Test functionality such as BOOST_TEST_MESSAGE with ordinary I/O calls.
Luigi
Thanks Guigi for your suggestion.
However, I don't know how to "compile and link" both the utilities.hpp and
utilities.cpp files in the sample project I created in Visual Studio 2015. I
tried 2 different ways:
1. I tried to include the path "...\test-suite\" in "Properties ->
Configuration Properties -> VC++ Directories". But how can I let the system
know that the utilities.cpp file is also in the same directory?
2. I tried to include the path "...\test-suite\" in "Properties ->
Configuration Properties -> C/C++ -> General -> Additional Include
Directories". Again, I got the same 9 errors as I mentioned last time;
3. I manually added the utilities.hpp and utilities.cpp files into the
project I created.
For all the 3 ways I tried, I got the same 9 errors as I mentioned last
time.
At this point, could you please advise how to correctly set up the
utilities.hpp and utilities.cpp files so that I can compile?
Thanks!
--
View this message in context: http://quantlib.10058.n7.nabble.com/How-to-load-utilities-hpp-in-a-self-built-project-tp18108p18121.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