How to include Quotes Manager API in C++?

From FxCodeBaseWiki
Jump to: navigation, search

The section describes how to include Quotes Manager API in C++ on different platforms to your application.

Details

Win32

To use Quotes Manager API in your C++ application on Win32, you should:

1. Place your application program in the same directory where supporting dlls are located (usually the bin folder containing gsexpat.dll, quotesmgr2.dll, gstool3.dll, etc.) For example, if folder C:\Program Files\Candleworks\PriceHistoryAPI\bin contains these libraries, post-built event command line can look like this:

        copy "C:\Program Files\Candleworks\PriceHistoryAPI\bin\*.dll" "$(TargetDir)"

Alternatively, you can build you application in the directory containing supporting dlls.

2. Add the include subfolder of the directory where Quotes Manager API is installed to additional include directories of the project. So if Quotes Manager API is installed to C:\Program Files\Candleworks\PriceHistoryAPI, add the directory C:\Program Files\Candleworks\PriceHistoryAPI\include\quotesmgr as additional include directory.

3. Add lines:

        #include <windows.h> 
        #include "quotesmgr/quotesmgr2.h"

to file stdafx.h.

4. Add lib subfolder of the directory where Quotes Manager API is installed to additional library directories of the project. So if Quotes Manager API is installed to C:\Program Files\Candleworks\PriceHistoryAPI, add the directory C:\Program Files\Candleworks\PriceHistoryAPI\lib as additional library directory. Add quotesmgr2.lib as additional dependency for the linker input.

Note: Quotes Manager API interfaces uses multi-byte strings so Character Set of Configuration Properties will be "Use Multi-Byte Character Set".

Linux/MacOS

To use Quotes Manager API in your C++ application on Linux or MacOS, you should:

1. Place supporting shared libraries in the same directory where your application program is located. Alternatively, you can place supporting shared libraries in the /usr/lib directory.

2. Add libquotesmgr2 to the list of libraries in the linker options. For example, if you use gcc, the option will be -lquotesmgr2. The path to the directory containing the libraries (e.g. /PriceHistoryAPI/lib) can be specified by the -L/PriceHistoryAPI/lib option.

3. Include the header file in your code using the directive #include "quotesmgr/quotesmgr2.h". The path to the directory containing the headers (e.g. /PriceHistoryAPI/include/quotesmgr) can be specified by the -I/PriceHistoryAPI/include/quotesmgr option.

This Article in Other Languages

Language: English  • español