Hi,
On 9/30/19 7:33 AM, 肖麟阁 via Tech-talk wrote:
I try to run it, but errors come out like following:
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:43: undefined reference to `ca_task_initialize'
makefile:29: recipe for target 'testEPICS' failed
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:46: undefined reference to `ca_search_and_connect'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:50: undefined reference to `ca_search_and_connect'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:55: undefined reference to `ca_pend_io'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:88: undefined reference to `ca_message'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:113: undefined reference to `ca_array_get'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:117: undefined reference to `ca_array_get'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:122: undefined reference to `ca_pend_io'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:144: undefined reference to `ca_message'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:157: undefined reference to `ca_state'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:165: undefined reference to `ca_state'
/home/xlg/eclipse-workspace/testEPICS/Debug/../main.c:169: undefined reference to `ca_task_exit'
collect2: error: ld returned 1 exit status
make: *** [testEPICS] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
Those error messages are from the linker, you need to tell it to link your program with the two libraries, so assuming you're using your own build script the linker needs the additional parameters '-lCa -lCom' and it might need others telling it where to find
those libraries such as '-L/path/to/your/library/directory'
by the way, someone else tell me that i just need libCa.so, libCom and some .h files to write a CA Client. is that true?
That is true. The EPICS build system provides a common framework that was designed to make building client programs easier, but you are not required to use it.
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
|