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  2012  2013  2014  <20152016  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  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: EPICS base-3.15.2 compilation error for VS Express 2015 on Windows 10
From: Mark Rivers <[email protected]>
To: "Chu, Paul" <[email protected]>, "[email protected] " <[email protected]>
Date: Thu, 20 Aug 2015 13:17:59 +0000
This problem has been found for other projects as well, e.g. libusb.  VS2015 time.h now defines timespec.

https://github.com/libusb/libusb/pull/60/files


This is the change from libusb:

 // We *were* getting timespec from pthread.h:
 #if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
 #define HAVE_STRUCT_TIMESPEC 1
+#if _MSC_VER >= 1900
+#include <time.h>
+#else
 #define _TIMESPEC_DEFINED 1
 struct timespec {
 		long tv_sec;
 		long tv_nsec;
 };
+#endif
 #endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */


The following patch to base/src/libCom/osi/os/WIN32/osdTime.h might work:

#if ! defined(_MINGW) || ! defined(_TIMESPEC_DEFINED)
+#if _MSC_VER >= 1900
+#include <time.h>
+#else 
struct timespec {
        time_t tv_sec; /* seconds since some epoch */
        long tv_nsec; /* nanoseconds within the second */
};
+#endif /* _MSC_VER >= 1900 */
+
#endif /* ! defined(_MINGW) || ! defined(_TIMESPEC_DEFINED) */

#endif /* ifndef osdTimeh */







From: [email protected] [[email protected]] on behalf of Chu, Paul [[email protected]]

Sent: Wednesday, August 19, 2015 11:43 PM

To: [email protected] 

Subject: EPICS base-3.15.2 compilation error for VS Express 2015 on Windows 10










Hi all,
 
When I tried to compile EPICS base 3.15.2 on Windows 10 with MS Visual Studio Express 2015, I got the following error. I tried on VS Express 2010 (with Windows SDK), 2012 and 2013 for Windows 10 and all went through without any problem (for both win32-x86
 and windows-x64). VS Express 2015 is the only one with trouble. The first error seems to be caused by ‘timespec’ redefined (see below). After I commented out the ‘timespec’ def in the code, there’s another array size exceeds limit error…

 
I was wondering if anybody else successfully compiled the code with VS Express 2015.
 
Thanks,
Paul
 
…
cl -EHsc -GR                -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_C
RT_NONSTDC_NO_DEPRECATE   -Ox -GL -Oy-   -W3 -w44355        -MD -DEPICS_BUILD_DL
L -DEPICS_CALL_DLL -TP  -I. -I../O.Common -I. -I../../../src/libCom/osi/compiler
/msvc -I../../../src/libCom/osi/compiler/default -I. -I../../../src/libCom/osi/o
s/WIN32 -I../../../src/libCom/osi/os/default -I.. -I../../../src/libCom/as -I../
../../src/libCom/bucketLib -I../../../src/libCom/calc -I../../../src/libCom/cvtF
ast -I../../../src/libCom/cppStd -I../../../src/libCom/cxxTemplates -I../../../s
rc/libCom/dbmf -I../../../src/libCom/ellLib -I../../../src/libCom/env -I../../..
/src/libCom/error -I../../../src/libCom/fdmgr -I../../../src/libCom/flex -I../..
/../src/libCom/freeList -I../../../src/libCom/gpHash -I../../../src/libCom/iocsh
-I../../../src/libCom/log -I../../../src/libCom/macLib -I../../../src/libCom/mi
sc -I../../../src/libCom/osi -I../../../src/libCom/pool -I../../../src/libCom/ri
ng -I../../../src/libCom/taskwd -I../../../src/libCom/timer -I../../../src/libCo
m/yacc -I../../../src/libCom/yacc -I../../../src/libCom/yajl -I../../../include/
compiler/msvc -I../../../include/os/WIN32 -I../../../include         -c ../../..
/src/libCom/fdmgr/fdmgr.cpp
fdmgr.cpp
../../../src/libCom/osi/os/WIN32\osdTime.h(21): error C2011: 'timespec': 'struct
' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\time.h(39): not
e: see declaration of 'timespec'
make[3]: *** [fdmgr.obj] Error 2
make[3]: Leaving directory `c:/epics/base-3.15.2/src/libCom/O.win32-x86'
make[2]: *** [install.win32-x86] Error 2
make[2]: Leaving directory `c:/epics/base-3.15.2/src/libCom'
make[1]: *** [libCom.install] Error 2
make[1]: Leaving directory `c:/epics/base-3.15.2/src'
make: *** [src.install] Error 2
make: Leaving directory `c:/epics/base-3.15.2'
 
 
Sent from 
Mail for Windows 10






References:
EPICS base-3.15.2 compilation error for VS Express 2015 on Windows 10 Chu, Paul

Navigate by Date:
Prev: cadoubletabwidget Mezger Anton Christian (PSI)
Next: RE: Tech-talk Digest, Vol 9, Issue 263 Mark Clift
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: EPICS base-3.15.2 compilation error for VS Express 2015 on Windows 10 Chu, Paul
Next: Re: EPICS base-3.15.2 compilation error for VS Express 2015 on Windows 10 Bob Soliday
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·