Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » USE external static library(USE external static library in linux)
USE external static library [message #1855413] Thu, 13 October 2022 00:54 Go to next message
jack li is currently offline jack liFriend
Messages: 15
Registered: August 2022
Junior Member
Dear Alois
I want to call an external static library in the algorithm of a simple function block under linux. How do I do this
best regards
Re: USE external static library [message #1855425 is a reply to message #1855413] Thu, 13 October 2022 12:41 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1584
Registered: January 2014
Senior Member

Hi,

I think for this the best is to make a SIFB. There you have more flexibility. you then can include the header files from the libary and call the methods from that lib. In your cmake you need to setup the linkage to that library. You can look into modules like OPC UA or MQTT for refernces what you need to do.

BR,
Alois
Re: USE external static library [message #1855490 is a reply to message #1855425] Tue, 18 October 2022 02:16 Go to previous messageGo to next message
jack li is currently offline jack liFriend
Messages: 15
Registered: August 2022
Junior Member
Dear Alois
OK I Got it,
I modified the Txt document to achieve the function of adding static library
1. Add a dependency directory
Add "link_directories(/home/forte/linuxlib)" to forte/src/CMakeLists.txt.
2. Add a library name
Add "TERGET_LINK_LIBRARIES(forte ccspsl) "to forte/src/CMakeLists.txt
best regards
Re: USE external static library [message #1855562 is a reply to message #1855490] Thu, 20 October 2022 12:30 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1584
Registered: January 2014
Senior Member

Great!
Previous Topic:Error CBSDSocketInterface: bind() failed: Adress already in use
Next Topic:Tranformation from .sys to .fboot
Goto Forum:
  


Current Time: Tue Apr 23 15:03:01 GMT 2024

Powered by FUDForum. Page generated in 0.03391 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top