|
From: Amine I. <ami...@gm...> - 2024-09-27 20:10:25
|
Sounds like an issue with the header file naming convention IMO. Make sure
you sort out your your header files search path relative to where your put
your main.cpp, as c++ tends to complain about this sometimes.
On Fri, 27 Sep 2024 at 19:59, Christofer Bogaso <bog...@gm...>
wrote:
> 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,
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|