Skip to content
⚡ Developer documentation for INFINICAM, the real-time high-speed camera (UC-1.1 / GbE-2)

Setting up a C/C++ development environment

This page walks you step by step, even if you are new to programming, through to building and running a C/C++ program (EXE) that uses the INFINICAM SDK.

Follow the steps from top to bottom, and at the end you will have a program that connects to the camera. If something doesn’t work along the way, see Troubleshooting.

Step What you do Time
1 Install Visual Studio 30–60 min (including download)
2 Run Hello World without the SDK 10 min
3 Download and place the SDK 5 min
4 Create a project that uses the SDK 15 min
5 Check that it works without a camera 5 min
6 Connect to the camera and run it 10 min
7 Run your EXE on another PC When needed

  • A Windows 11 (64-bit) PC: the SDK is 64-bit only.
  • Administrator rights: needed to install Visual Studio. If you don’t have them on a university PC, ask your administrator.
  • At least 10 GB of free disk space: used by the Visual Studio installation.
  • An internet connection
  • The INFINICAM camera and its cable: used in step 6. You can do everything up to step 5 without a camera.

To create C/C++ programs, you install Microsoft’s development tool, Visual Studio.

  1. Download the installer

    Open the official Visual Studio site and download the Visual Studio 2026 installer with the “Get free download” button (Community).

    The Get free download button on the official Visual Studio site (outlined in red)
  2. Choose the workload (features)

    Run the downloaded VisualStudioSetup.exe. A window for choosing the features to install appears.

    • Check “Desktop development with C++”.
    The Visual Studio Installer workloads screen with Desktop development with C++ checked
  3. Install

    Click “Install” at the bottom right. Downloading and installing takes 30 minutes to an hour. Restarting the PC afterwards is a good idea.


First, check that a program runs with Visual Studio alone, without the SDK.

  1. Prepare a folder for your projects

    In File Explorer, create a folder named infinicam_projects in C:\. All the projects you create on this site are saved here.

  2. Start Visual Studio

    Start Visual Studio. The first time, a sign-in screen appears. Sign in with your university account or a personal Microsoft account, or choose “Skip this for now” to continue.

  3. Create a new project

    • On the start window, click “Create a new project”.

    • From the template list, choose “Empty Project” (Language: C++ / Platform: Windows) and click “Next”.

    • Enter Sample01 as the project name and C:\infinicam_projects as the location, check “Place solution and project in the same directory”, and click “Create”.

      The Configure your new project screen with Sample01 as the project name and C:\infinicam_projects as the location
  4. Add a C++ file (.cpp)

    • In “Solution Explorer” on the right side of the window, right-click “Source Files”.

    • Choose “Add” > “New Item”.

      Source Files right-clicked, with Add > New Item selected
    • In the “Add new item” window, enter main.cpp as the file name and click “Add”.

      The Add new item window with main.cpp entered as the file name

      Always end the file name with .cpp.

  5. Enter the code

    Enter the following code in the main.cpp you added.

    #include <stdio.h>
    int main(void) {
    printf("Hello, World!\n");
    return 0;
    }
  6. Run the program

    Press Ctrl + F5 (Start Without Debugging) to run it.

    If Hello, World! appears in the black window (console), it worked.


Prepare the components (SDK) for controlling INFINICAM from a program. All explanations on this site assume the SDK is placed in C:\infinicam_sdk\. If you put it in the same place, you can follow the explanations as written.

  1. Download the SDK

    Download the latest SDK ZIP file (for example PUCLIB_SDK_v1.7.0.0.zip) from the Resources & Downloads page.

  2. Extract the ZIP file

    Right-click the downloaded ZIP file and choose “Extract All”.

  3. Place it in C:\infinicam_sdk\

    Open the extracted folder. It contains 4 folders, dll, doc, include, and lib, and THIRD_PARTY_NOTICES.txt.

    In File Explorer, create a folder named infinicam_sdk in C:\, and copy all of these contents into it.

    If it looks like this, it is placed correctly.

    • Directoryinfinicam_sdk/ Folder created directly under C:\
      • Directoryinclude/ Header files (descriptions of the components your program loads)
        • PUCCONST.h
        • PUCLIB.h
        • PUCUTIL.h
      • Directorylib/ Import libraries (used when building)
        • PUCLIB.lib
        • PUCUTIL.lib
      • Directorydll/ DLLs (used when running the program)
        • ICYUSB.dll
        • IGETHERB.dll
        • PICCLIB.dll
        • PUCLIB.dll
        • PUCUTIL.dll
      • Directorydoc/ API reference (HTML)
        • …
      • THIRD_PARTY_NOTICES.txt License notices for external software used by the SDK

To use the SDK, the project needs settings that tell it “where the SDK is”. Go through the following 7 steps one at a time.

  1. Create a new project

    • In Visual Studio, choose “Create a new project”.

    • From the template list, choose “Console App” (C++ / Windows / Console) and click “Next”.

      The Create a new project screen with Console App selected
    • Enter InfinicamTest as the project name and C:\infinicam_projects as the location, check “Place solution and project in the same directory”, and click “Create” (for notes on where to save, see step 2-1).

      The Configure your new project screen with InfinicamTest as the project name, C:\infinicam_projects as the location, and Place solution and project in the same directory checked (outlined in red)

    When the project is created, InfinicamTest.cpp opens with Hello World code that starts with #include <iostream>.

    Visual Studio right after creating the project. InfinicamTest.cpp contains Hello World code
  2. Set the platform to x64

    Check that the platform box in the toolbar at the top of the window shows x64. It is usually x64 from the start, but if it shows x86, change it to x64.

    The Debug configuration and x64 platform boxes in the toolbar (outlined in red)
  3. Open the properties window

    • Open the “Project” menu at the top of the window and choose “InfinicamTest Properties” at the bottom (your own project name appears in place of “InfinicamTest”).

      The Project menu opened, with InfinicamTest Properties at the bottom outlined in red
    • At the top of the window, set “Configuration” to “All Configurations” and “Platform” to “x64”. If Platform shows “Active(x64)”, you can leave it as it is.

    The top of the properties window. Configuration is All Configurations and Platform is Active(x64) (outlined in red)
  4. Set the header file location (C/C++ > General)

    In the tree on the left, choose “Configuration Properties” > “C/C++” > “General” and enter the following path in “Additional Include Directories”.

    C:\infinicam_sdk\include
    C/C++ > General in the properties window, with C:\infinicam_sdk\include entered in Additional Include Directories (outlined in red)
  5. Read source files as UTF-8 (C/C++ > Command Line)

    In the tree on the left, choose “C/C++” > “Command Line” and enter the following in “Additional Options”.

    /utf-8
    C/C++ > Command Line in the properties window, with /utf-8 entered in Additional Options (outlined in red)

    This makes the compiler read source files as UTF-8. It is needed when your source code contains non-ASCII text, such as the Japanese comments and messages in the sample code bundle.

  6. Set the library location and name (Linker)

    • In the tree on the left, choose “Linker” > “General” and enter the following path in “Additional Library Directories”.

      C:\infinicam_sdk\lib
      Linker > General in the properties window, with C:\infinicam_sdk\lib entered in Additional Library Directories (outlined in red)
    • In the tree on the left, choose “Linker” > “Input” and add the following to the start of “Additional Dependencies”. Don’t forget the ; at the end.

      PUCLIB.lib;
      Linker > Input in the properties window, with PUCLIB.lib; added to the start of Additional Dependencies (outlined in red)

      Don’t delete the $(CoreLibraryDependencies);%(AdditionalDependencies) that is already there; add PUCLIB.lib; in front of it.

  7. Copy the DLLs automatically (Build Events)

    To run the program, the SDK DLLs must be in the same folder as the EXE. Set them to be copied automatically on every build.

    In the tree on the left, choose “Build Events” > “Post-Build Event” and enter the following in “Command Line”.

    xcopy /Y /D "C:\infinicam_sdk\dll\*.dll" "$(OutDir)"
    Build Events > Post-Build Event in the properties window, with the xcopy command entered in Command Line (outlined in red)

    Finally, click “Apply” > “OK” to close the properties window.


5. Checking that it works (without a camera)

Section titled “5. Checking that it works (without a camera)”

Check that the settings are correct without connecting a camera.

  1. Enter the code

    Open the .cpp file with the same name as the project (for example InfinicamTest.cpp), delete everything in it, and paste the following code.

    #include <stdio.h>
    #include <stdlib.h>
    #include <PUCLIB.h> // INFINICAM SDK header
    int main()
    {
    printf("Checking that the INFINICAM SDK initializes...\n");
    PUCRESULT ret = PUC_Initialize();
    if (ret != PUC_SUCCEEDED) {
    printf("Error: failed to initialize the SDK. ErrorCode: %d\n", ret);
    return EXIT_FAILURE;
    }
    printf("OK: the SDK was loaded. Your development environment is ready.\n");
    return EXIT_SUCCESS;
    }
  2. Build and run

    Press Ctrl + F5. The build starts, and when it finishes, the program runs automatically.

    If you see the following, your development environment is ready.

    Checking that the INFINICAM SDK initializes...
    OK: the SDK was loaded. Your development environment is ready.
    The console window showing OK: the SDK was loaded. Your development environment is ready.

    The lines below it, such as “… exited with code 0 (0x0)” and “Press any key to close this window . . .”, are messages from Visual Studio. Press any key to close the window.

    If the “Output” window at the bottom of the screen shows 5 File(s) copied and Build: 1 succeeded, the build and the automatic DLL copy are also working correctly.


This program detects and connects to the camera and shows its serial number. You keep using the project you created in step 4.

  1. Allow traffic from the camera through the firewall (GbE-2 only, first time only)

    Windows Firewall blocks newly built EXEs from communicating with the camera. As is, the camera can be found, but you get “Error: could not open the camera. ErrorCode: 9”.

    So you create one rule that allows traffic coming from the camera (192.168.0.10). Once created, it works for the EXE of any project, in both Debug and Release.

    1. Type “PowerShell” in the Start menu, right-click PowerShell in the results, and choose “Run as administrator”.

    2. Copy and paste the following line and press Enter.

      Terminal window
      New-NetFirewallRule -DisplayName "INFINICAM GbE-2" -Direction Inbound -Protocol UDP -RemoteAddress 192.168.0.10 -Action Allow -Profile Any
    3. When you see DisplayName : INFINICAM GbE-2 and Enabled : True, as below, you are done.

      The rule created in an administrator PowerShell. DisplayName is INFINICAM GbE-2 and Enabled is True
  2. Enter the code

    Replace the contents of the .cpp file with the following code.

    #include <stdio.h>
    #include <stdlib.h>
    #include <PUCLIB.h> // INFINICAM SDK header
    int main()
    {
    printf("Initializing INFINICAM...\n");
    // 1. Initialize the SDK
    PUCRESULT ret = PUC_Initialize();
    if (ret != PUC_SUCCEEDED) {
    printf("Error: failed to initialize the SDK. ErrorCode: %d\n", ret);
    return EXIT_FAILURE;
    }
    // 2. Search for connected cameras
    PUC_DETECT_FILTER filter = { 0 };
    filter.nDeviceTypeFlags = PUC_DETECT_TARGET_ALL; // Search for both UC-1.1 and GbE-2
    PUC_DETECT_INFO detectInfo = { 0 };
    ret = PUC_DetectDevice2(&filter, &detectInfo);
    if (ret != PUC_SUCCEEDED || detectInfo.nDeviceCount == 0) {
    printf("Error: no camera was found. ErrorCode: %d\n", ret);
    printf("Check the cable connection and the network settings.\n");
    return EXIT_FAILURE;
    }
    printf("Camera detected. (count: %u)\n", detectInfo.nDeviceCount);
    // 3. Open the first camera found
    PUC_HANDLE hDevice = NULL;
    ret = PUC_OpenDevice2(0, &hDevice);
    if (ret != PUC_SUCCEEDED) {
    printf("Error: could not open the camera. ErrorCode: %d\n", ret);
    return EXIT_FAILURE;
    }
    printf("SUCCESS: connected to the camera!\n");
    // 4. Show camera information
    UINT64 serialNo = 0;
    if (PUC_GetSerialNo(hDevice, &serialNo) == PUC_SUCCEEDED) {
    printf("Serial number: %llu\n", serialNo);
    }
    // 5. Close the camera
    PUC_CloseDevice(hDevice);
    return EXIT_SUCCESS;
    }
  3. Connect the camera and run it

    Connect the camera to the PC and press Ctrl + F5. If you see the following, it worked.

    Initializing INFINICAM...
    Camera detected. (count: 1)
    SUCCESS: connected to the camera!
    Serial number: (your camera's serial number)
    The console window showing that the camera was detected, SUCCESS: connected to the camera!, and the serial number

Your program can run on a PC without Visual Studio.

  1. Build in Release

    Change the configuration in the toolbar from Debug to Release, and build with “Build” > “Build Solution” (Ctrl + Shift + B) from the menu.

  2. Gather the files you need

    The EXE and DLLs are in x64\Release\ inside the project folder (for example C:\infinicam_projects\InfinicamTest\x64\Release\). Copy the following 6 files to the other PC, keeping them together in one folder.

    • InfinicamTest.exe (your program)
    • PUCLIB.dll, PUCUTIL.dll, PICCLIB.dll, ICYUSB.dll, IGETHERB.dll
  3. Prepare the other PC

    • The other PC also needs the Visual C++ Redistributable (x64). Download vc_redist.x64.exe from the following link and run it to install.

      https://aka.ms/vc14/vc_redist.x64.exe (a permanent link to Microsoft’s latest version)

    • To use the GbE-2, the other PC also needs the network settings and the firewall rule from step 6-1.


Symptom / error Likely cause What to do
You can’t find “Solution Explorer” on the right side of the window It was closed, or is hidden behind another tab (such as “Git Changes”) Show it with “View” > “Solution Explorer” (Ctrl + Alt + L) from the menu
The windows are scattered, or you can’t find a window you need Windows were closed or dragged around Restore the original layout with “Window” > “Reset Window Layout” from the menu
C1083: Cannot open include file: 'PUCLIB.h' The header file location is set incorrectly Check the path in step 4-4, and that C:\infinicam_sdk\include\PUCLIB.h exists
LNK1104: cannot open file 'PUCLIB.lib' The library location is set incorrectly Check the path in step 4-6, and that C:\infinicam_sdk\lib\PUCLIB.lib exists
LNK2019: unresolved external symbol PUC_... PUCLIB.lib was not added, or you are building for x86 Check “Additional Dependencies” in step 4-6 and x64 in step 4-2
“The code execution cannot proceed because MSVCP140.dll (or VCRUNTIME140.dll) was not found” The Visual C++ Redistributable is not installed on a PC without Visual Studio Install vc_redist.x64.exe (step 7-3)
“The code execution cannot proceed because PUCLIB.dll was not found” The DLLs are not in the same folder as the EXE Check the setting in step 4-7. Check that x64\Debug\ contains the 5 DLLs
The build fails with MSB3073 The command "xcopy ..." in the Error List, and “Invalid number of parameters”, “0 File(s) copied”, or “… exited with code 4” in the Output window The post-build event command is wrong (/Y /D typed as \Y \D, the SDK path is wrong, and so on) Copy and paste the command from step 4-7 again. Check that C:\infinicam_sdk\dll exists
“The application was unable to start correctly (0xc000007b)” 32-bit and 64-bit are mixed Check that the configuration is x64 and that the copied DLLs come from the SDK’s dll folder
Non-ASCII text such as Japanese comments causes errors or garbled output The source file encoding setting is missing Check /utf-8 in step 4-5
“Error: no camera was found” Cable, IP address, or firewall settings Check PC requirements and network settings
Builds sometimes fail, or “Access is denied” appears The project is saved in a folder synced by OneDrive or similar Recreate the project in C:\infinicam_projects (see step 2-1)
“File not found” errors, or garbled paths in error messages The project path contains non-ASCII characters or spaces Same as above
“Error: could not open the camera. ErrorCode: 9” The camera was found but can’t be communicated with. It is blocked by Windows Firewall, or another application is using the camera Create the firewall rule in step 6-1. Close other applications such as viewers

These are the settings from step 4. Use this list when you create your second and later projects.

Where Item Value
Toolbar Platform x64
C/C++ > General Additional Include Directories C:\infinicam_sdk\include
C/C++ > Command Line Additional Options /utf-8
Linker > General Additional Library Directories C:\infinicam_sdk\lib
Linker > Input Additional Dependencies PUCLIB.lib;
Build Events > Post-Build Event Command Line xcopy /Y /D "C:\infinicam_sdk\dll\*.dll" "$(OutDir)"

Used with permission from Microsoft.