Hi Stephen,
On 06/27/2016 04:53 PM, Stephen Molloy wrote:
> I have some C code that I would like to convert to a subroutine record.
> I normally build the executable with g++ using a -lwiringPi flag,
> but I don’t know the correct way to do this in order to compile the
> EPICS subroutine. Is there a standard place I should put the library,
> or is there some change I need to make to the Makefile (and, if so,
> which Makefile?) to get this to work?
If libwiringPi.a or .so is found in a standard system library location
such as /usr/lib or /usr/local/lib then to your Makefile that builds the
IOC executable (probably in a somethingApp/src directory) you would add
the line
PROD_SYS_LIBS += wiringPi
which tells the build that it needs to link the IOC with this system
library after it compiles your subroutine record code found in the same
directory.
If you are building libwiringPi.{a,so} yourself as part of this IOC then
I will have more questions about how and where you are building that
library to give you the correct answer. Let's start with that one though.
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- References:
- Including libraries in subroutines Stephen Molloy
- Navigate by Date:
- Prev:
Including libraries in subroutines Stephen Molloy
- Next:
Re: Including libraries in subroutines Stephen Molloy
- 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
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Including libraries in subroutines Stephen Molloy
- Next:
Re: Including libraries in subroutines Stephen Molloy
- 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
2019
2020
2021
2022
2023
2024
|