EPICS Controls 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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Microsoft managed code CLI C++ and EPICS
From: Mark Clift <[email protected]>
To: "[email protected] ([email protected])" <[email protected]>
Date: Thu, 27 Sep 2012 10:09:26 +1000
Hi Mark, 

Thanks for your reply.  A change of requirements means that I no longer need to solve the problem of mixing EPICS, and managed code.  I did learn a few things that maybe helpful though.  With regard to the interop facility only.  I believe the /clr (common language runtime) must be applied to use interop.

1.  EPICS base 3.14.12-2 will compile and run as normal with the following setup

Line 297 CONFIG.win32-x86.win32-x86

CCC = cl /nologo /EHa /GR /clr

Note change in exception type, and addition of /clr flags.  (ie. /EHsc and /clr are not compatible)

Other build settings:

SHARED_LIBRARIES=YES
STATIC_BUILD=NO

Required as /clr is not compatible with static builds (ie.  /clr and /MT are not compatible)

2.  Cannot get Asyn 4-20 to build dynamically due to epicsShareFunc in paramVal.cpp/.h

So it seems possible solutions are:

1.  Make Asyn 4-20 compatible with dynamic builds on windows.
2.  Change over to the COMwrapper approach.  I have example code on this process which is standard c++ calling managed code via a COMwrapper dll.  The trick is to use C# for the wrapper dll.  For C++ it seems there is little help available to develop COMwrapper dlls.

Option 1 sounds reasonably elegant, option 2 not so much.

Cheers,

Dr. Mark Clift
Senior Controls Engineer
Australian Synchrotron
800 Blackburn Road
Clayton 3168
Ph: +613 8540 4264
Fax: +613 8540 4200
Mail: [email protected]

Navigate by Date:
Prev: MKS937B Vacuum Gauge Controllers.... David Reid
Next: RE: MKS937B Vacuum Gauge Controllers.... Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Microsoft managed code CLI C++ and EPICS Mark Rivers
Next: EPICS Collaboration Meeting October 2012 : Hotel Reservation Ilyou Kim
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·