Login  Register

How to load utilities.hpp in a self-built project

Posted by ziegele on Feb 24, 2017; 9:17pm
URL: http://quantlib.414.s1.nabble.com/How-to-load-utilities-hpp-in-a-self-built-project-tp18108.html

I tried to use utilities.hpp stored in ...\test-suite\ from Visual-Studio 2015. I tried 3 different ways:

1. Load only boost-library and quantlib directories in Properties -> Configuration Properties -> VC++ Directories. In the main.cpp file, I write:

#include <iostream>
#include <ql\quantlib.hpp>
#include <test-suite\utilities.hpp>
using namespace QuantLib;

int main() {
        std::cout << "Test\n";

        system("pause");
        return 0;
}

2. Load only boost-library and quantlib directories in Properties -> Configuration Properties -> VC++ Directories. In the main.cpp file, I write:

#include <iostream>
#include <ql\quantlib.hpp>
#include "test-suite\utilities.hpp"
using namespace QuantLib;

int main() {
        std::cout << "Test\n";

        system("pause");
        return 0;
}

3. Load boost-library and quantlib directories in Properties -> Configuration Properties -> VC++ Directories. Then load ...\test-suite\ in "Include Directories". In the main.cpp file, I write:

#include <iostream>
#include <ql\quantlib.hpp>
#include "utilities.hpp"
using namespace QuantLib;

int main() {
        std::cout << "Test\n";

        system("pause");
        return 0;
}

However, none of them worked. I got 9 errors for all the 3 ways I tried:



Can anyone please advise how to correctly load utilities.hpp file into a self-built project? The main.cpp file is super simple... (Please also notice that if I comment-out the line #include "utilities.hpp", I will get a valid output).

Thanks!