|
From: Christofer B. <bog...@gm...> - 2024-09-27 18:56:48
|
Hi,
I installed Quantlib in a custom folder, and then ran following 'Hello
World' code
#include <iostream>
#include <ql/interestrate.hpp>
int main()
{
std::cout << "Hello World" << std::endl;
}
Above code fails with below error message
Starting build...
/usr/bin/g++ -fdiagnostics-color=always -g
/Users/XXX/QuantLib/QL/include/Custom_Date.cpp -o
/Users/XXX/QuantLib/QL/include/Custom_Date
/Users/XXX/QuantLib/QL/include/Custom_Date.cpp:2:10: error:
'ql/interestrate.hpp' file not found with <angled> include; use
"quotes" instead
2 | #include <ql/interestrate.hpp>
| ^~~~~~~~~~~~~~~~~~~~~
| "ql/interestrate.hpp"
In file included from /Users/XXX/QuantLib/QL/include/Custom_Date.cpp:2:
/Users/XXX/QuantLib/QL/include/ql/interestrate.hpp:27:10: fatal error:
'ql/compounding.hpp' file not found
27 | #include <ql/compounding.hpp>
| ^~~~~~~~~~~~~~~~~~~~
2 errors generated.
Build finished with error(s).
* The terminal process failed to launch (exit code: -1).
* Terminal will be reused by tasks, press any key to close it.
I am using Mac and VScode to run the C++ code.
Could you please suggest if I need to perform anything specific to run
above code? I mostly followed the instructions in
https://www.quantlib.org/install/macosx.shtml to install Quantlib in
my Mac.
Any pointer will be very helpful.
Many thanks,
|