gclib  2.0.8
Communications API for Galil controllers and PLCs
Microsoft Windows

Copy files

  • Navigate to a convenient, empty, writable location, e.g. C:\Users\{username}\Documents\Galil\cpp_examples.
  • Copy the contents of C:\Program Files (x86)\Galil\gclib\examples\cpp\examples to this location.

Open Visual Studio Project

The following instructions were performed on Visual Studio Professional 2017 and Visual Studio Professional 2019 and can be extended to other Visual Studio versions. For brevity, the instructions assume the default installation location of C:\Program Files (x86)\Galil\gclib and a build type of x64.

  • Launch Visual Studio 2017 or Visual Studio 2019.
  • Choose File->Open->Project/Solution....
  • Navigate to the examples.vcxproj file in the C:\Users\{username}\Documents\Galil\cpp_examples directory.
  • Click Open.
  • In the Solution Explorer right-click on the examples project file, choose Properties.
    • Click the Configuration Manager... button.
      • Under Active solution platform: choose x64.
      • Click Close.
    • Highlight Configuration Properties in the side bar, and set the following project properties.
      • Configuration Properties -> Debugging -> Environment add PATH=C:\Program Files (x86)\Galil\gclib\dll\x64;%PATH%
      • Click OK.
  • Many of the examples require command line arguments to execute. To enter command line arguments in Visual Studio:
    • In the Solution Explorer right-click on the examples project file, choose Properties.
      • Under Configuration Properties, highlight Debugging in the side bar. Enter the appropriate arguments in the Command Arguments box. Refer to each example's landing page for required command line arguments.
  • Ensure the Solution Configurations and Solution Platforms are set to Debug and x64 respectively.
  • Hit F5 to build and run the example.

Run a Different Example

To run a different example, remove the current example from the solution and add the next example.

  • In the Solution Explorer right-click on commands_example.cpp, choose Remove.
    • Click the Remove button.
  • In the Solution Explorer right-click on the examples project file, choose Add->Existing Item.
    • Navigate to the desired example file and click Add.
  • Hit F5 to build and run the example.