EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: epicsExport.h on Windows
From: Mark Rivers <[email protected]>
To: Ralph Lange <[email protected]>, EPICS Core Talk <[email protected]>
Date: Tue, 21 Mar 2017 12:31:43 +0000
Hi Ralph,

I don't use epicsExportAddress very much.  But I just did a search of all of synApps, including areaDetector, and found this:

corvette:~/devel>find . -name '*.cpp' -exec grep -H epicsExportAddress {} \;
./areaDetector-2-6/ADCore/ADApp/ADSrc/NDArrayPool.cpp:extern "C" {epicsExportAddress(int, eraseNDAttributes);}
./motor-6-9/motorApp/NPointSrc/C300MotorDriver.cpp:extern "C" {epicsExportAddress(int, C300Tolerance);}
./motor-6-9/motorApp/OmsAsynSrc/omsMAXv.cpp:extern "C" {epicsExportAddress(int, motorMAXvdebug);}
./motor-6-9/motorApp/OmsAsynSrc/omsMAXvEncFunc.cpp:extern "C" {epicsExportAddress(int, motorMAXvEncFuncdebug);}
./motor-6-9/motorApp/OmsAsynSrc/omsMAXnet.cpp:extern "C" {epicsExportAddress(int, motorMAXnetdebug);}
./motor-6-9/motorApp/OmsAsynSrc/omsBaseController.cpp:extern "C" {epicsExportAddress(int, motorOMSBASEdebug);}

So all instances are indeed wrapped in extern "C".

A search of base 3.14.12.5, 3.15.5, and EPICS V4 4.6.0 finds no occurrences of epicsExportAddress in .cpp files.

Mark


________________________________
From: [email protected] [[email protected]] on behalf of Ralph Lange [[email protected]]
Sent: Tuesday, March 21, 2017 7:16 AM
To: EPICS Core Talk
Subject: epicsExport.h on Windows

Dear Core-Talkers,

For a device support partly written in C++, we have been getting a pull request for Windows builds that adds extern "C" declarations around EPICS exports, e.g.

-epicsExportAddress(double, connectInterval);
+extern "C" {
+    epicsExportAddress(double, connectInterval);
+}

with the comment

I am afraid that the extern statements in epicsExport.h are ignored by VS compiler when expanding the epicsRegisterFunction macro. Therefore they need to be repeated here otherwise we get a linking failure when building test IOC.

As my Windows experience is very limited - is there a better way to handle that?

Thanks,
~Ralph


Replies:
RE: epicsExport.h on Windows Mark Rivers
References:
epicsExport.h on Windows Ralph Lange

Navigate by Date:
Prev: epicsExport.h on Windows Ralph Lange
Next: Re: epicsExport.h on Windows Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: epicsExport.h on Windows Ralph Lange
Next: RE: epicsExport.h on Windows Mark Rivers
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·