Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
<== Date ==> <== Thread ==>

Subject: write a CA client by API in Eclipse
From: 肖麟阁 via Tech-talk <tech-talk@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Mon, 30 Sep 2019 20:33:19 +0800 (GMT+08:00)

Hi,

    i have built a baseR3.15.6 on Ubuntu16. and then then i get the EPICS CA Client Library libCa.so and EPICS Common Library libCom.so. then i include these libs and other .h files in Eclise. i want to use API to write a CA Client by myself. the path i include are like this:

        ‘’‘

        <base>/include

        <base>/include/os/linux

        <base>/lib/linux-x86_64

        ’‘’


    in order to test if the API is available, i download a example lesson1 on

        http://epics.web.psi.ch/training/caClientLessons/#lesson1.

    and i copy its code into the Eclise's source file. then 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.        

        '''

    it seems that the program can't find the API functions, but i actually include them in path.

    i don't know what wrong is.

    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 ture?


Replies:
Re: write a CA client by API in Eclipse Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: RE: error binding socket Alfio Rizzo via Tech-talk
Next: Re: write a CA client by API in Eclipse Johnson, Andrew N. via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
Navigate by Thread:
Prev: Re: ENVVAR.right_trim in IOC console Jemian, Pete R. via Tech-talk
Next: Re: write a CA client by API in Eclipse Johnson, Andrew N. via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
ANJ, 30 Sep 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·