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

To develop in C/C++ on Windows, install “Visual Studio,” Microsoft’s official integrated development environment (IDE).

  1. Download the installer

    From the Visual Studio official site, download “Visual Studio Community 2022.”

  2. Select workloads (features)

    Run the downloaded VisualStudioSetup.exe and check the following item.

    • Check “Desktop development with C++”
  3. Run the installation

    Click “Install” in the lower right of the screen.

Once the installation is complete, let’s write and run an actual C++ program.

  1. Launch Visual Studio

    Launch Visual Studio. If a sign-in screen appears on first launch, sign in with your university account or a personal Microsoft account, or select “Skip for now” to proceed.

  2. Create a new project

    • Click “Create a new project” in the lower right of the start screen.
    • From the list of templates, select “Empty Project” (Language: C++ / Platform: Windows), then click “Next.”
    • Specify a project name (e.g. Sample01) and save location, then click “Create.”
  3. Add a C++ file (.cpp)

    • Right-click “Source Files” in the “Solution Explorer” on the right side of the screen.
    • Select “Add” > “New Item.”
    • Select “C++ File (.cpp)”, confirm the name (e.g. main.cpp), and click “Add.”
  4. Write the code

    In the editor for the added main.cpp, enter the following C++ code.

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

    Press Ctrl + F5 (Start Without Debugging) together to run the program.

    If a black (console) screen appears showing the program’s output, you have succeeded!

Downloading the SDK & placing it in your project

Section titled “Downloading the SDK & placing it in your project”
  1. Obtain the SDK archive (ZIP)

    From this site’s downloads page, download the latest PUCLIB_SDK.zip.

  2. Extract the archive

    Extract the downloaded ZIP file to a folder of your choice. The extracted folder contains the following files.

    • include/: Header files (PUCLIB.h, PUCCONST.h, PUCUTIL.h)
    • lib/: Import libraries (PUCLIB.lib, PUCUTIL.lib)
    • dll/: Dynamic libraries for runtime use (PUCLIB.dll, PUCUTIL.dll, etc.)
  3. Place the files in your development project

    Place the above headers and libraries in the root directory of the C++ project you are creating (or configure the paths to them).

This is minimal sample code (main.cpp) that initializes the SDK and performs a connection test.

#include <cstdio>
#include "PUCLIB.h"
int main() {
printf("--- INFINICAM SDK Initializing ---\n");
// 1. Initialize the SDK
PUCRESULT res = PUC_Initialize();
if (PUC_CHK_FAILED(res)) {
fprintf(stderr, "SDK initialization failed. Error code: 0x%08X\n", res);
return -1;
}
// 2. Detect connected devices
PUC_DETECT_INFO detectInfo = {0};
res = PUC_DetectDevice(&detectInfo);
if (PUC_CHK_FAILED(res)) {
fprintf(stderr, "Device detection failed.\n");
return -1;
}
printf("Number of INFINICAM devices detected: %u\n", detectInfo.nDeviceCount);
// 3. Open the device (if at least one was detected)
if (detectInfo.nDeviceCount > 0) {
PUC_HANDLE hDevice = NULL;
res = PUC_OpenDevice(0, &hDevice);
if (PUC_CHK_SUCCEEDED(res)) {
printf("SUCCESS: Successfully connected to INFINICAM!\n");
// Close the device
PUC_CloseDevice(hDevice);
} else {
fprintf(stderr, "ERROR: Failed to open the device.\n");
}
} else {
printf("No camera found. Please check the USB or LAN cable connection.\n");
}
return 0;
}

When building the project with Visual Studio (MSVC) or similar, configure the following project properties.

Setting Example value
Additional Include Directories $(ProjectDir)include
Additional Library Directories $(ProjectDir)lib\x64
Additional Dependencies PUCLIB.lib
Platform x64 (64-bit required)