Hello,
We have a project that is written for the target axcf2152 FW 2024.0. I would like to move it to 2025. I’ve changed the target of the project, but the buid fails, because of
Requested build for targets AXCF2152,25.0.3.99
Starting build for target AXCF2152,25.0.3.99
Starting process where cmake in .
Checking if CMake needs to be reconfigured...
Starting process where cmake in .
Starting process C:\Program Files\PHOENIX CONTACT\PLCnext_Toolchain\cmake\bin\cmake.exe C:\Users\RobinHeitz\Documents\PLCnextProjects\SBLocalization\intermediate\cmake\AXCF2152_25.0.3.99\Release in .
[cmake]: -- Configuring done (0.0s)
[cmake]: -- Generating done (0.0s)
[cmake]: -- Build files have been written to: C:/Users/RobinHeitz/Documents/PLCnextProjects/SBLocalization/intermediate/cmake/AXCF2152_25.0.3.99/Release
Starting process where cmake in .
Starting process C:\Program Files\PHOENIX CONTACT\PLCnext_Toolchain\cmake\bin\cmake.exe in C:/Users/RobinHeitz/Documents/PLCnextProjects/SBLocalization/intermediate/cmake/AXCF2152_25.0.3.99/Release.
[cmake]: [ 8%] Building CXX object CMakeFiles/SBLocalization.dir/intermediate/code/SBLocalizationComponent.meta.cpp.o
[cmake]: In file included from C:/Users/RobinHeitz/Documents/PLCnextProjects/SBLocalization/intermediate/code/SBLocalizationComponent.meta.cpp:1:
[cmake]: C:/Users/RobinHeitz/Documents/PLCnextProjects/SBLocalization/src/SBLocalizationComponent.hpp:4:10: fatal error: Arp/System/Acf/IApplication.hpp: No such file or directory
[cmake]: 4 | #include "Arp/System/Acf/IApplication.hpp"
[cmake]: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[cmake]: compilation terminated.
[cmake]: make[2]: *** [CMakeFiles/SBLocalization.dir/build.make:76: CMakeFiles/SBLocalization.dir/intermediate/code/SBLocalizationComponent.meta.cpp.o] Error 1
[cmake]: make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/SBLocalization.dir/all] Error 2
[cmake]: make: *** [Makefile:136: all] Error 2
cmake process exited with error
Rollback transaction.
PS C:\Users\RobinHeitz\Documents\PLCnextProjects\SBLocalization>
I have looked through the API documentation and saw that 1) Arp/System/Acf/IApplication.hpp header does not exists anymore in 2025.0 and 2) that there is Arp/Base/Acf/Commons/Application.hpp Is that the replacement? Is there a guide on how to migrate from 2024.0 to 2025.0? Thanks.
There’s more. See here: https://www.plcnext.help/Changes_2025.htm
This specific error can be addressed by something like (if you want to continue supporting < 2025 as well)
Thanks for the quick reply, I basically found out about the snipped you’ve mentioned by comparing a new project with an older one.
Just to help others, I got this linking err:
[cmake]: C:/Users/RobinHeitz/Documents/PLCnextFW/2152/sdk_2025.0/sysroots/x86_64-w64-mingw32/usr/bin/arm-pxc-linux-gnueabi/../../libexec/arm-pxc-linux-gnueabi/gcc/arm-pxc-linux-gnueabi/13.3.0/ld.exe: CMakeFiles/SBLocalization.dir/intermediate/code/SBLocalizationComponent.meta.cpp.o: in function `SBLocalization::SBLocalizationComponent::RegisterComponentPorts()':
[cmake]: SBLocalizationComponent.meta.cpp:(.text+0x2a): undefined reference to `Arp::Plc::Meta::Commons::DataTypeEnum::DataTypeEnum(Arp::Plc::Meta::Commons::DataType)'
[cmake]: C:/Users/RobinHeitz/Documents/PLCnextFW/2152/sdk_2025.0/sysroots/x86_64-w64-mingw32/usr/bin/arm-pxc-linux-gnueabi/../../libexec/arm-pxc-linux-gnueabi/gcc/arm-pxc-linux-gnueabi/13.3.0/ld.exe: SBLocalizationComponent.meta.cpp:(.text+0x34): undefined reference to `Arp::Plc::Meta::Commons::DataTypeEnum::IsComplex(bool) const'
[cmake]: C:/Users/RobinHeitz/Documents/PLCnextFW/2152/sdk_2025.0/sysroots/x86_64-w64-mingw32/usr/bin/arm-pxc-linux-gnueabi/../../libexec/arm-pxc-linux-gnueabi/gcc/arm-pxc-linux-gnueabi/13.3.0/ld.exe: SBLocalizationComponent.meta.cpp:(.text+0x6a): undefined reference to `Arp::Plc::Meta::Commons::operator==(Arp::Plc::Meta::Commons::DataTypeEnum const&, Arp::Plc::Meta::Commons::DataType)'
[cmake]: collect2.exe: error: ld returned 1 exit status
[cmake]: make[2]: *** [CMakeFiles/SBLocalization.dir/build.make:286: libSBLocalization.so] Error 1
[cmake]: make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/SBLocalization.dir/all] Error 2
[cmake]: make: *** [Makefile:136: all] Error 2
cmake process exited with error
I needed to make this change to CMakeList.txt:
From
find_package(ArpDevice REQUIRED)
find_package(ArpProgramming REQUIRED)
to
find_package(ArpDevice REQUIRED)
if(${ARP_VERSION_MAJOR} GREATER_EQUAL "25")
find_package(Arp REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE Arp::ALL)
else()
find_package(ArpProgramming REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE ArpDevice ArpProgramming)
endif()
Additionally, I needed to create a new file called `<Project Name>LibraryInfo.hpp` with only this content here:
#include "Arp/Base/Core/Arp.hpp"
namespace TestNamespace2025
{
const ArpVersion TestProj2025LibraryVersion = ArpVersion(1); // adjust your library version number here
} // end of namespace TestNamespace2025
I recommend to create a new project (with SDK 25.0) and compare that to the old project.
#if ARP_ABI_VERSION_MAJOR < 2 #else
# include “Arp/Base/Core/Arp.hpp”
namespace Redacted {
const ArpVersion RedactedLibraryVersion = ArpVersion(2);
} // end of namespace VodasNext #endif
I assumed that the ArpVersion should be ‘2’, not ‘1’, since that’s the Arp-version the library targets. I have the exact same change in CMakeLists.txt, thanks for sharing.
#if ARP_ABI_VERSION_MAJOR < 2\n#else\n# include "Arp\/Base\/Core\/Arp.hpp"\nnamespace Redacted {\nconst ArpVersion RedactedLibraryVersion = ArpVersion(2);\n\n\n} \/\/ end of namespace VodasNext\n#endif\n<\/pre>
I assumed that the ArpVersion should be '2', not '1', since that's the Arp-version the library targets.<\/p>
I have the exact same change in CMakeLists.txt, thanks for sharing.<\/p>
Well, good catch. Actually, I dont know... it works with 1 there...