0

Hi I am trying to compile my first QuantLib program. --> quantlib-sample.cpp

#include <ql/time/all.hpp>
using namespace QuantLib;

int main()
{
  Date d1(14, February, 2014);
  return 0;
}

when I am running on the windows command prompt: g++.exe -o quantlib-sample-1.exe -g quantlib-sample-1.cpp -I 'path_to_QuantLib_folder' -I 'path_to_boost_folder' it is showing me the following: undefined reference to QuantLib::Date::Date(int, QuantLib::Month, in). What am I doing wrong? Please help as I have been spending days figuring this out....

  • it seems to be a linking issue, have you tried to provide -L and -l options https://stackoverflow.com/questions/29468211/gcc-difference-between-l-and-l-option-and-how-to-provide-complete-path-to-a-l – Alessandro Teruzzi Jun 14 '21 at 20:32

0 Answers0