USE external static library [message #1855413] |
Thu, 13 October 2022 00:54  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.24712 seconds