I've been trying to run some of the example code (BermudanSwaption) in Xcode but keep getting an EXC_BAD_ACCESS code=2.
But compiling and running the BermudanSwaption code in the terminal works correctly.
The following code throws the same error in Xcode.
#include <ql/quantlib.hpp>
#include <iostream>
using namespace QuantLib;
int main (){
Date date(18, March, 2014);
std::cout << date << std::endl;
}
And this runs correctly.
g++ -I/opt/local/include/ -I/opt/local/include/boost main.cpp -o main -L/opt/local/lib/ -lQuantLib
Are there some specific settings I need to tweak in Xcode in order for this to run?