Undefined Reference to Library

Hi all,

I am trying to add the IoMqtt library to our project. We are using an X90Mobile system with Automation Runtime Version B4.93. When the simulator is enabled, the project compiles without any issues. However, when it is not, I get an “undefined reference” error. Previously, it was a “file not recognized: file format not recognized” error.

We are still beginners with B&R and may not understand some of the basics yet. But why is there a difference between the simulator and the actual system? And what does the error fundamentally mean? Why should the file format not be recognized when the simulator obviously does recognize it?

Thanks!

Hi,

Unfortunately I don’t know that library.

But the main difference between ArSim and the X90 PLC is the processor architecture: ArSim uses Intel like some of the X20 PLCs and APCs, but X90 uses ARM processors like Compact-S PLCs for example.

So maybe this library does not support / was never compiled against an ARM target?
I don’t know it to be honest, but at least it would explain the undefined reference because of a missing precompiled .a file or so.

Best regards!

Hi again,

I had a look on github and I saw, that the’re different revisions of that library. The first revisions were only compiled for Intel, but the newer ones also include ARM.
So if you’re using the latest revision ARM is included, and my previous idea about missing ARM support was wrong.

Best regards!

1 Like

Hi,
Thank you very much for your help!
Yes, I noticed that with ARM as well.
The build of the library is not for the runtime version I’m using, but then it should have issues in both cases, right?
And I find the error message peculiar (File format not recognized)…

Best regards

Simple yet effective: Try to set your GCC compiler to V6.

Project → Change Runtime Version → Build → GCC Version: V6.3.0

Best regards!

2 Likes