Setting up to use the HIL C API in Windows
The user needs to follow a set of steps to setup the C/C++ application to use the HIL C API. For Windows platforms, we assume that Microsoft Visual Studio 2005 or later version is being used to develop the application. Please perform the following procedure to setup your application, once in the Microsoft Visual Studio environment. These instructions assume that QUARC or the Quanser SDK has already been installed.
Open the Property Pages window by right-clicking on the project containing your application and choosing the menu item in the context menu. The following figure illustrates this window.
In the Property Pages window, click on the C/C++ pane. The first parameter
in this pane is called Additional Include Directories. Type in $(QSDK_DIR)include
in
its field as shown in the figure below. Note that QSDK_DIR
is an environment variable referring to
the directory in which the HIL API has been installed.
Click on the Linker pane and expand its treeview. In the General section of this pane, there is a parameter
called Additional Library Directories. For the Win32 platform, type in $(QSDK_DIR)lib\windows
in its field as shown in the figure below. For the x64 platform, use $(QSDK_DIR)lib\win64
instead, since the
code must be linked with 64-bit versions of the QUARC libraries in that case.
While in the Linker pane, click on the Input section. The first parameter in this section is called
Additional Dependencies. Type in hil.lib quanser_runtime.lib quanser_common.lib
in this field as illustrated in the following figure. Note that the entries in this
field should each be separated by a single space.
Once all these changes are made, click on Apply and then OK.
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.