Skip to content

C++ 2020.3 Issue

Hello,

So I'm attempting to setup an Eclipse C++ program and I have followed the installation guide from:

and the programming guide from: .

My AXC F 2152 firmware is updated to 2020.3 and I've installed the PLCnext Technology C++ tool chain for Windows including Compiler, Eclipse Add-in, Microsoft Visual Studio Extension, and LibraryBuilder.
PLCnCLI_SDK_2020.3.1_Windows_AXC_F_2152.zip.

At the last step of the Eclipse section, i've tried to build the program but I'm recieving errors from the intermediate folder. Any idea what it might be?

Comments

  • Hello,
    what parts of the code is failing to build?
    I think the curcial parts of the error message are ommitted in the screenshot.

    Also what gets highlighted in the Library and meta.cpp file?
    Which Eclipse Version/Build are you using
    kind regards,
    Oliver

  • HI,

    Thanks for the response. The errors come from almost all parts of the program.

    I am running this version of eclipse.

    Version: 2020-09 (4.17.0)
    Build id: 20200910-1200

    Kind regards,

    Sean

  • Also the Project is called Test.

  • Hello Sean,

    I tried reproducing the issues you described.

    Version: 2020-09 (4.17.0)

    Build id: 20200910-1200
    Projectname:Test

    $ ./plcncli.exe --version

    plcncli 20.0.0.243 (20.0.0.243)

    2020.3 SDK for AXC F 2152<br />Windows 10 PRO 1809


    I dont get any errors. (clean project)

    Please just copy the text of the error message there are information missing in your screenshot.

    From the text displaying issues in the console i think something might be wron with the JRE version is wrong.
    Maybe some permissions on the SDK are not set. 

    These are just assumptions.

    kind regards,
    Oliver

  • Hello Oliver,

    Sorry for the delayed response. When you say error messages I'm assuming the messages in the Problems window.

    Description Resource Path Location Type
    Field 'componentFactory' could not be resolved TestLibrary.cpp /Test/intermediate/code line 13 Semantic Error
    Field 'myComponent' could not be resolved MyComponentProgramProvider.cpp /Test/intermediate/code line 11 Semantic Error
    Field 'typeDomain' could not be resolved TestLibrary.meta.cpp /Test/intermediate/code line 13 Semantic Error
    Function 'CreateInstance' could not be resolved TestLibrary.cpp /Test/intermediate/code line 19 Semantic Error
    Function 'GetInstance' could not be resolved MyComponent.cpp /Test/src line 9 Semantic Error
    Function 'GetInstance' could not be resolved MyComponent.cpp /Test/src line 11 Semantic Error
    Function 'GetInstance' could not be resolved TestLibrary.cpp /Test/intermediate/code line 25 Semantic Error
    Function 'Main' could not be resolved TestLibrary.cpp /Test/intermediate/code line 24 Semantic Error
    Function 'Version' could not be resolved TestLibrary.cpp /Test/intermediate/code line 10 Semantic Error
    Member declaration not found MyComponentProgramProvider.cpp /Test/intermediate/code line 7 Semantic Error
    Member declaration not found TestLibrary.cpp /Test/intermediate/code line 9 Semantic Error
    Member declaration not found TestLibrary.cpp /Test/intermediate/code line 17 Semantic Error
    Member declaration not found TestLibrary.meta.cpp /Test/intermediate/code line 11 Semantic Error
    Method 'AddFactoryMethod' could not be resolved TestLibrary.cpp /Test/intermediate/code line 13 Semantic Error
    Method 'AddTypeDefinitions' could not be resolved TestLibrary.meta.cpp /Test/intermediate/code line 13 Semantic Error
    Method 'GetNamespace' could not be resolved MyComponent.cpp /Test/src line 11 Semantic Error
    Method 'GetNamespace' could not be resolved TestLibrary.cpp /Test/intermediate/code line 11 Semantic Error
    Method 'InitializeTypeDomain' could not be resolved TestLibrary.cpp /Test/intermediate/code line 14 Semantic Error
    PLCnCLI Build Error: [cmake]: make.exe: *** [Makefile:130: all] Error 2 Test C/C++ Problem
    PLCnCLI Build Error: [cmake]: make.exe[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/Test.dir/all] Error 2 Test C/C++ Problem
    PLCnCLI Build Error: [cmake]: make.exe[2]: *** [CMakeFiles/Test.dir/build.make:182: libTest.so] Error 1 Test C/C++ Problem
    Symbol 'ComponentBase' could not be resolved MyComponent.cpp /Test/src line 9 Semantic Error
    Symbol 'make_shared' could not be resolved MyComponentProgramProvider.cpp /Test/intermediate/code line 11 Semantic Error
    Symbol 'MetaLibraryBase' could not be resolved TestLibrary.cpp /Test/intermediate/code line 10 Semantic Error
    Symbol 'None' could not be resolved TestLibrary.meta.cpp /Test/intermediate/code line 18 Semantic Error
    Symbol 'Program' could not be resolved TestLibrary.meta.cpp /Test/intermediate/code line 18 Semantic Error
    Symbol 'ProgramComponentBase' could not be resolved MyComponent.cpp /Test/src line 11 Semantic Error
    Symbol 'Ptr' could not be resolved MyComponent.hpp /Test/src line 75 Semantic Error
    Symbol 'typeDomain' could not be resolved TestLibrary.cpp /Test/intermediate/code line 11 Semantic Error
    Type '::Test::MyProgram' could not be resolved MyComponentProgramProvider.cpp /Test/intermediate/code line 11 Semantic Error
    Type 'ILibrary' could not be resolved TestLibrary.hpp /Test/intermediate/code line 39 Semantic Error
    Type 'MyComponentProgramProvider' could not be resolved MyComponent.hpp /Test/src line 44 Semantic Error
    Type 'Test::MyProgram' could not be resolved TestLibrary.meta.cpp /Test/intermediate/code line 18 Semantic Error

    Thank you for your help,

    Sean

  • I'm not sure if this is a problem or not, but in the zip folder I downloaded off the Phoenix Contact in the AXC F 2152 software section the PLCnCLI_setup runs a 2020/0 LTS setup.

  • Hello Sean,


    sorry i meant the compiler error message that appears in the "Console".
    In your screenshots the text is cut.

    Also please doublecheck that the SDK has been installed correctly.
    You have to "unzip here" it!
    eclipse sdk

     

    The location indicated looks something  like this:

    sdk installlocation

     

    And also the folder permissions:
    permissions folder sdk

    I can think of two tests now:

    * Can you try creating a project on the desktop and load that in your eclipse? (to check if it is a permission issue)

    * To check if this is related to eclipse at all you can test from CMD terminal: (to check if it is a eclipse issue)

    plcncli.exe new project -n LIB_CppDemo -c MyCppComponent -p MyCppProgram
    cd LIB_CppDemo
    plcncli.exe set target --add -n axcf2152 -v 2020.3
    plcncli.exe generate all
    plcncli.exe build


    kind regards,
    Oliver

  • Hello Oliver,

    Sorry for the wrong information. This is the output from the console, whilst trying to build the project. Just extra knowledge I decided to revert to 2020.0 LTS to see if it was perhaps because I was using an archived software. Set everything up as per the "How to install Eclipse IDE tools on Windows 10 | C++ with PLCnext Technology" video, reinstalled everything according to 2020.0 LTS and managed to repeat the same result.

    cmd.exe /c ""C:\Program Files\PHOENIX CONTACT\PLCnCLI 2020.0 LTS/plcncli.exe" generate code -p"C:/Users/staing/eclipse-workspace/Test" -s"src""
    Generating all files with the 'code' generator for C:\Users\staing\eclipse-workspace\Test.
    Successfully generated all files with the 'code' generator for C:\Users\staing\eclipse-workspace\Test.

    cmd.exe /c ""C:\Program Files\PHOENIX CONTACT\PLCnCLI 2020.0 LTS/plcncli.exe" generate config -p"C:/Users/staing/eclipse-workspace/Test" -s"src""
    Generating all files with the 'config' generator for C:\Users\staing\eclipse-workspace\Test.
    Successfully generated all files with the 'config' generator for C:\Users\staing\eclipse-workspace\Test.

    cmd.exe /c ""C:\Program Files\PHOENIX CONTACT\PLCnCLI 2020.0 LTS/plcncli.exe" build -p"C:/Users/staing/eclipse-workspace/Test" -b Release"
    Requested build for targets AXCF2152,20.0.0.24752
    Starting build for target AXCF2152,20.0.0.24752
    Checking if CMake needs to be reconfigured...
    [cmake]:
    [cmake]: C:\Users\staing\eclipse-workspace\Test\intermediate\cmake\AXCF2152,20.0.0.24752\Release>set PATH=C:\Users\staing\Downloads\PLCnCLI_SDK_2020.0_Windows_AXC_F_2152\sysroots\x86_64-pokysdk-mingw32\usr\bin;C:/Users/staing/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932/jre/bin/server;C:/Users/staing/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32\Wbem;c:\windows\system32;C:\ProgramData\Oracle\Java\javapath;C:\windows\yagarto\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Calibre2\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Program Files (x86)\HI-TECH Software\PICC-Lite\9.50\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Program Files (x86)\HI-TECH Software\PICC\9.83\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files (x86)\Phoenix Contact\Visu+2.42\;C:\Program Files (x86)\Phoenix Contact\Visu+2.42\AlarmDispatcher;C:\Program Files (x86)\Phoenix Contact\Visu+ Express 2.42 Build 1154.8\;C:\Program Files (x86)\Phoenix Contact\Visu+ Express 2.42 Build 1154.8\AlarmDispatcher;C:\HT-PIC\BIN;C:\Users\staing\eclipse\cpp-2020-092\eclipse;
    [cmake]: [35m[1mScanning dependencies of target Test[0m
    [cmake]: [ 12%] [32mBuilding CXX object CMakeFiles/Test.dir/intermediate/code/TestComponent.meta.cpp.o[0m
    [cmake]: [ 25%] [32mBuilding CXX object CMakeFiles/Test.dir/intermediate/code/TestComponentProgramProvider.cpp.o[0m
    [cmake]: [ 37%] [32mBuilding CXX object CMakeFiles/Test.dir/intermediate/code/TestLibrary.cpp.o[0m
    [cmake]: [ 50%] [32mBuilding CXX object CMakeFiles/Test.dir/intermediate/code/TestLibrary.meta.cpp.o[0m
    [cmake]: [ 62%] [32mBuilding CXX object CMakeFiles/Test.dir/src/TestComponent.cpp.o[0m
    [cmake]: [ 75%] [32mBuilding CXX object CMakeFiles/Test.dir/src/TestProgram.cpp.o[0m
    [cmake]: [ 87%] [32m[1mLinking CXX shared library libTest.so[0m
    [cmake]: arm-pxc-linux-gnueabi-g++.exe: error: CMakeFiles/Test.dir/intermediate/code/TestComponent.meta.cpp.o CMakeFiles/Test.dir/intermediate/code/TestComponentProgramProvider.cpp.o CMakeFiles/Test.dir/intermediate/code/TestLibrary.cpp.o CMakeFiles/Test.dir/intermediate/code/TestLibrary.meta.cpp.o CMakeFiles/Test.dir/src/TestComponent.cpp.o CMakeFiles/Test.dir/src/TestProgram.cpp.o : No such file or directory
    [cmake]: make.exe[2]: *** [CMakeFiles/Test.dir/build.make:185: libTest.so] Error 1
    [cmake]: make.exe[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/Test.dir/all] Error 2
    [cmake]: make.exe: *** [Makefile:130: all] Error 2
    cmake process exited with error

    In regards, to the other solutions. I have double checked to ensure that the SDK is installed correctly. Prior it was not installed in the Downloads folder, but in the C drive like the vid recommended. So i moved the SDK to the Downloads folder and the program still fails. I have also checked that the SDK folders have the same permissions as in your photo.

    SDKPath.PNG

    SKDs.PNG

    Downloads.PNG

    For making a project on the Desktop. Im assuming you mean changing the Eclipse workspace to the desktop. I did it, the project was created fine but the result was still the same.

    For using the CMD terminal i followed the steps but when try to use "plcncli.exe set target --add -n axcf2152 -v 2020.3".

    CMD.PNG

     

    Thank you,

    Sean

  • Hello Sean,

    This realy looks like some kind folder/file permission problem.

    plcncli does not seem to be on the path in your case.
    So you will have to access it from like this ".../plcncli.exe ". 
    Or add the target project to the plcncli command.
    plcncli.exe set target --help plcncli.exe set target --help
    plcncli set target --add -p Path/To/Project -n axcf2152 -v 2019.0plcncli set target --add -p Path/To/Project -n axcf2152 -v 2019.0

    The Error:
    [cmake]: arm-pxc-linux-gnueabi-g++.exe:
    error:
    CMakeFiles/Test.dir/intermediate/code/TestComponent.meta.cpp.o
    CMakeFiles/Test.dir/intermediate/code/TestComponentProgramProvider.cpp.o
    CMakeFiles/Test.dir/intermediate/code/TestLibrary.cpp.o

    CMakeFiles/Test.dir/intermediate/code/TestLibrary.meta.cpp.o
    CMakeFiles/Test.dir/src/TestComponent.cpp.o
    CMakeFiles/Test.dir/src/TestProgram.cpp.o
    :
    No such file or directory

    So either one of these files does not exist or is not accessable.
    or
    the linker arm-pxc-linux-gnueabi-g++.exe is not accessable.
    (check with:

    /PLCnCLI_SDK_2020.6.1_Windows_AXC_F_2152/SDK/PLCnCLI_SDK_2020.6.1_Windows_AXC_F_2152/SDK
    $
    ./sysroots/x86_64-pokysdk-mingw32/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-g++.exe --version
    )

    check in your explorer that the g++ can be executed.


    Maybe you have some kind of firewall/antivirus that delets binaries (cpp.o files) during the build process or something?

    kind regards,
    Oliver

Sign In or Register to comment.