Include external object files

61 views
Skip to first unread message

Al Zol

unread,
Apr 6, 2021, 3:40:37 PM4/6/21
to OMNeT++ Users
Hi everyone,

I have been given function written in C that I need to call as part of my simulation. I have the source C (functions.c), the gcc compiled object file (functions.a) and the header file (functions.h). The file "functions.c" only contains one function called main which calls on multiple other files, but after building the object file, I can simply call "./functions.a" to run the execution from the command line. 

I am now having trouble calling the function found in the "functions.a" file from within my omnet++ source code. I consulted this Stack thread, however, since my eclipse project is an omnet++ project, the properties don't contain the "C/C++ Build -> Settings -> GCC C Linker" settings. 

Any suggestion on how include the functions found in "functions.a" to my omnet++ project? Any alternate solution to call external C functions would also be appreciated. 
Reply all
Reply to author
Forward
0 new messages