The C++ Project
Start by creating a C++ project that produces a dll as output (In Microsoft Visual C++: File - New - Project - Win32 Dynamic-Link Library). The project name is not important as long as the name of the output dll is unique.
Add the “qlab31.lib” file in the project to enable linking your code to the Quantlab types and functions.
Include the “ql.h” header file (located in the Quantlab\ql_api\include directory) in every source file, and make sure the preprocessor has access to the directory where it is located (In Microsoft Visual C++: Project - Settings - C/C++ - Category: Preprocessor - Additional include directories).
The file “ql.h” contains all header files used by Quantlab:
“ql_object.h”
“ql_func.h”
“ql_base.h”
“ql_date.h”
“ql_error.h”
“ql_string.h”
“ql_calendar.h”
“ql_curve.h”
“ql_fit.h”
“ql_fit_result.h”
“ql_instrument.h”
“ql_model.h”
“ql_realtime.h”
“ql_rng.h”
“ql_support.h”
“ql_tag.h”
The compiled dll file has to be saved in the folder that you specify in the second path in Tools Options in Quantlab (DLLs used by Quantlab).