Error Occured while Build Source after Export & Import Library

  1. Using Project FIle “A” with CPU X20CP0482, I Exported User Library From “A” Project File.

  2. Import User Library and modified source on Simulation Project File “B” with standard PC

  3. Export library as binary library from “B” project file, and I Imported this library to “A” project file.

  4. Build “A” Project File and occured error “Undefined reference to 'FB_Name”

Is it problem? and can i know why?

Hi,

have you added function block calls while modifying the code on ‘B’?
And if yes, is the library from where you’ve added a function block on ‘B’ also part of the logical view libraries of ‘A’, and is the library deployed to the CPU in ‘A’?

Best regards.

1 Like

Thanks for your apply,

Yes, I added FB Calls A first, and also called B while modifying in B.
And after Build “B”, I exported library from “B” to “A”

(Before Import Library to A, I deleted using library.)

I Called FB both side A and B, so I deployed library to CPU A(X20CP0482) & B(Standard PC).

Okay.
Hard to say then without having the project. Normally it should work independent if the library is source or binary, as long as the function block definitions haven’t changed… is the undefined reference thrown by a task compile, and is the named FB out of your own lib?

Best regards.

1 Like

When exporting binary libraries they are only compiled for the CPU architectures used in the project. So a good way is to have one ARM CPU (Like a Compact-S, X20CP0482) and One Intel CPU (For example X20CP1685) and build both configurations before exporting the library as binary.


Automation Help: Exporting as binary source library

3 Likes

Thanks ,
Difference of target CPU was cause.

I have another question,
is it possible build all configurations at same time?

Hi,

yes, you have to activate the “Batch” checkboxes of all of the configurations you want to build, and start a batch build (project → batch
→ build menu).

Best regards.

1 Like