I began to make myself familiar with „Creating functions and function block libraries written in C++“, „Creating a Shared Native Library project with the PLCnext CLI“:
Functions and functions blocks
This feature is based on Shared Native Libraries and is a combination of C++ implementation and C# wrapper. The PLCnext Technology Toolchain supports Shared Native Libraries with a Microsoft® Visual Studio® IDE template, or on the command line via the PLCnext CLI.
I followed the procedure described in the link provided for my own ‚snfunction‘, in Windows®. Contrary to the description „
A *.pcwlx library is being stored in the bin directory of the C++ project“, no pcwlx file appears anywhere after running the command plcncli build all, despite it says „Successfully built the project Standard_FB for target AXCF3152,25.6.0.40“. Looking around, I came across this section in the file Standard_FB\Standard_FBCSharp\Standard_FBCSharp.csproj:
<PropertyGroup>
<!-- Build templates for the native interfaces -->
<CreateNativeInterfaces>true</CreateNativeInterfaces>
<!-- Build the Firmware library for PLCnext Engineer (*.pcwlx) -->
<CreateEngineeringLibrary>false</CreateEngineeringLibrary>
<PLCnCLIProjectType>snproject</PLCnCLIProjectType>
<EclrProjectName>Standard_FB</EclrProjectName>
<MinCliVersion>22.3.0</MinCliVersion>
</PropertyGroup>
Could <CreateEngineeringLibrary>false be the culprit? I could of course simply change the false to true and try again, but I’d like to know why building the library doesn’t work out of the box.