Building fresh Eclipse - C++ Project fails

Hi,
I’ve used the video tutorial to setup the Eclipse environment and install the IDE plugin. The problem is, after creating a new project, I get the following errors in the build process and the PLCNextEngineer-Library (.pcxf?) does not get created.

cmd.exe /c „„C:\Program Files\PHOENIX CONTACT\PLCnCLI/plcncli.exe“ generate code -p"C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse WS/TestProj“ -s"src""Generating all files with the ‚code‘ generator for C:\Users\RobinHeitz\PhoenixContactPLCEngineer\Eclipse WS\TestProj.

[cmake]: CMake Warning:[cmake]: Ignoring extra path from command line:[cmake]: [cmake]: „WS\TestProj\intermediate\cmakeAutoBuild\AXCF2152,24.0.9.199\Release“[cmake]: [cmake]: [cmake]: CMake Error: The source directory „C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse“ does not exist.[cmake]: Specify --help for usage, or press the help button on the CMake GUI.Successfully generated all files with the ‚code‘ generator for C:\Users\RobinHeitz\PhoenixContactPLCEngineer\Eclipse WS\TestProj.

cmd.exe /c „„C:\Program Files\PHOENIX CONTACT\PLCnCLI/plcncli.exe“ generate config -p"C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse WS/TestProj“ -s"src""

Generating all files with the ‚config‘ generator for C:\Users\RobinHeitz\PhoenixContactPLCEngineer\Eclipse WS\TestProj.

[cmake]: CMake Warning:[cmake]: Ignoring extra path from command line:[cmake]: [cmake]: „WS\TestProj\intermediate\cmakeAutoBuild\AXCF2152,24.0.9.199\Release“[cmake]: [cmake]: [cmake]: CMake Error: The source directory „C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse“ does not exist.[cmake]: Specify --help for usage, or press the help button on the CMake GUI.Successfully generated all files with the ‚config‘ generator for C:\Users\RobinHeitz\PhoenixContactPLCEngineer\Eclipse WS\TestProj.

cmd.exe /c „„C:\Program Files\PHOENIX CONTACT\PLCnCLI/plcncli.exe“ build -p"C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse WS/TestProj“ -b Release"

Requested build for targets AXCF2152,24.0.9.199Starting build for target AXCF2152,24.0.9.199Checking if CMake needs to be reconfigured…Configuring CMake…[cmake]: – Setting ARP_TOOLCHAIN_NATIVE_SYSROOT=‚C:/Users/RobinHeitz/PhoenixContact/sysroots/x86_64-w64-mingw32‘[cmake]: – Setting ARP_TOOLCHAIN_TARGET_SYSROOT=‚C:/Users/RobinHeitz/PhoenixContact/sysroots/cortexa9t2hf-neon-pxc-linux-gnueabi‘[cmake]: – Setting ARP_TOOLCHAIN_ENVIRONMENT_PATH=‚C:/Users/RobinHeitz/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.8.v20250724-1412/jre/bin/server;C:/Users/RobinHeitz/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.8.v20250724-1412/jre/bin;C:/Program Files (x86)/Common Files/Oracle/Java/java8path;C:/Program Files (x86)/Common Files/Oracle/Java/javapath;C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common;C:/Windows/system32;C:/Windows;C:/Windows/System32/Wbem;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Windows/System32/OpenSSH;C:/Program Files/dotnet;C:/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit;C:/Program Files/Microsoft VS Code/bin;C:/Program Files/Git/cmd;C:/Program Files/Microsoft SQL Server/120/Tools/Binn;C:/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn;C:/Program Files (x86)/Microsoft SQL Server/150/Tools/Binn;C:/Program Files/Microsoft SQL Server/150/Tools/Binn;C:/Program Files/Microsoft SQL Server/150/DTS/Binn;C:/Users/RobinHeitz/AppData/Local/Programs/Python/Python313/Scripts;C:/Users/RobinHeitz/AppData/Local/Programs/Python/Python313;C:/Users/RobinHeitz/AppData/Local/Microsoft/WindowsApps;C:/Users/RobinHeitz/AppData/Local/Programs/Microsoft VS Code/bin;C:/Program Files/PHOENIX CONTACT/PLCnCLI;C:/Windows/System32;C:/Users/RobinHeitz/PhoenixContact/sysroots/x86_64-w64-mingw32/usr/bin‘[cmake]: – The C compiler identification is GNU 11.4.0[cmake]: – The CXX compiler identification is GNU 11.4.0[cmake]: – Detecting C compiler ABI info[cmake]: – Detecting C compiler ABI info - done[cmake]: – Check for working C compiler: C:/Users/RobinHeitz/PhoenixContact/sysroots/x86_64-w64-mingw32/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-gcc.exe - skipped[cmake]: – Detecting C compile features[cmake]: – Detecting C compile features - done[cmake]: – Detecting CXX compiler ABI info[cmake]: – Detecting CXX compiler ABI info - done[cmake]: – Check for working CXX compiler: C:/Users/RobinHeitz/PhoenixContact/sysroots/x86_64-w64-mingw32/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-g++.exe - skipped[cmake]: – Detecting CXX compile features[cmake]: – Detecting CXX compile features - done[cmake]: – Found ArpProgramming: C:/Users/RobinHeitz/PhoenixContact/sysroots/cortexa9t2hf-neon-pxc-linux-gnueabi/usr/include/plcnext [cmake]: – Configuring done (5.7s)[cmake]: – Generating done (0.0s)[cmake]: – Build files have been written to: C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse WS/TestProj/intermediate/cmake/AXCF2152,24.0.9.199/Release[cmake]: [ 14%] Building CXX object CMakeFiles/TestProj.dir/intermediate/code/TestProjComponent.meta.cpp.o[cmake]: [ 28%] Building CXX object CMakeFiles/TestProj.dir/intermediate/code/TestProjComponentProgramProvider.cpp.o[cmake]: [ 42%] Building CXX object CMakeFiles/TestProj.dir/intermediate/code/TestProjLibrary.cpp.o[cmake]: [ 57%] Building CXX object CMakeFiles/TestProj.dir/intermediate/code/TestProjLibrary.meta.cpp.o[cmake]: [ 71%] Building CXX object CMakeFiles/TestProj.dir/src/TestProjComponent.cpp.o[cmake]: [ 85%] Building CXX object CMakeFiles/TestProj.dir/src/TestProjProgram.cpp.o[cmake]: [100%] Linking CXX shared library libTestProj.so[cmake]: [100%] Built target TestProj[cmake]: Install the project…[cmake]: – Install configuration: „Release“[cmake]: – Installing: C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse WS/TestProj/bin/AXCF2152_24.0.9.199/Release/lib/libTestProj.soSuccessfully built the project TestProj for target AXCF2152,24.0.9.199.Finished build for all targets

cmd.exe /c „„C:\Program Files\PHOENIX CONTACT\PLCnCLI/plcncli.exe“ deploy -p"C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse WS/TestProj“ -b Release -s"src""

[cmake]: CMake Warning:[cmake]: Ignoring extra path from command line:[cmake]: [cmake]: „WS\TestProj\intermediate\cmake\AXCF2152,24.0.9.199\Release“[cmake]: [cmake]: [cmake]: CMake Error: The source directory „C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse“ does not exist.[cmake]: Specify --help for usage, or press the help button on the CMake GUI.The cmake sysroot does not exist.Are there any ideas?

Program.png
VarTable.png
Datatype.png

Hello Robin,
I see the following Cmake error message in error log:
„CMake Error: The source directory „C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse“ does not exist.“
The following path will be used in your project:
C:/Users/RobinHeitz/PhoenixContactPLCEngineer/Eclipse WS/TestProj/bin/AXCF2152_24.0.9.199/Release/lib/libTestProj.so
You can try to rename the path „Eclipse WS“ with „EclipseWS“ or „Eclipse_WS“.
If possible, please reduce your project path e.g. as follwos „C:\PLCnext\EclipseWS“

BR Eduard

Thanks Eduard,
So thanks to your help, I can compile now. Whitespaces in paths are not allowed…
However, If I add this library to the PLCNextEngineer Project, Schedule the Program in a task, I now get the following runtime exception:

Screenshot 2025-08-20 114750.png
What could be the reason? Note: Still nothing changed in Code, it is the template. I also tried to do the same with PLCNextEngineer 2024 LTS instead of 2025.0.3, same result.

What firmware version is on the PLC?
image.png

Hi,
2025.0.2 (25.0.2.92) is the current FW. I will downgrade to test with 2024 LTS.

Hi, </p>2025.0.2 (25.0.2.92) is the current FW. I will downgrade to test with 2024 LTS.</p>

I think that explains the behaviour.
Firmware versions 2025.0 and later include major changes that mean C++ libraries need to be rebuilt with the SDK for that firmware version. This is described in the Info Center, here:
Application-relevant changes 2025 This documentation specifies changes of the PLCnext Control firmware and SDK regarding the release 2025.0 that may be relevant to user-generated applications (this content is available for download as a PDF file click to show its hash valueclick to show its hash value40bb6b2c1cfcad83da10ada608b5e0f3). Building with an SDK that matches the firmware should solve the problem.