C# (Windows Platform)
Download SDK
Choose any of the following methods to download Camport Multi_language SDK:
Access: https://github.com/percipioxyz/camport_multi_language.git using a browser and download the Camport Multi_language SDK.
Use the git command to obtain a local copy: Open the terminal, switch to the working directory where the SDK should be stored, and enter the
git clone
command to clone the remote repository.git clone https://github.com/percipioxyz/camport_multi_language.git
Sample Program Descriptions
The sample programs are stored in the csharp
folder in the root directory of the SDK. For detailed descriptions of the sample programs, refer to Sample Program Descriptions: C#.
Install Dependencies
Before compiling, please:
Install SWIG (version 4.0.2 or above).
Download link: https://www.swig.org/download.html
Install CMake (version 3.15.0 or above).
Download link: https://cmake.org/download/
Install Visual Studio and .NET components.
Compile Sample Programs
To compile the sample programs, do the following:
Configure environment variables: Right-click on This PC, select Properties > Advanced system settings > Environment Variables, in the Environment Variables page, add the executable file path of the local SWIG to the system variable
Path
.Open the
CMakeLists.txt
in thecamport_multi_language
directory, set the target language to CSHARP, the installed version of .NET Framework to match the local version, and the local path of SWIG.Create a new folder in the
camport_multi_language
directory and name itcsharp_build_x64
.Start cmake-gui, specify the source code directory as
camport_multi_language
, and specify the build output directory ascamport_multi_language/csharp_build_x64
.Click on Configure, select the Visual Studio version and X86/X64 version settings.
Click on Generate.
Click on Open Project to open the project, then select Release in the Visual Studio menu bar and click on Build > Build Solution in order.
Note
After modifying the source code, you need to rebuild the executable files by selecting Release in the Visual Studio menu bar and then click on Build > Rebuild Solution.
After compilation, copy the dynamic library tycam.dll
in the camport3/lib/win/hostapp/x64
directory to the camport_multi_language/csharp_build_x64/Bin/Release
directory, open Windows PowerShell, and run the generated executable files.