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

Subject: Re: Motor record compilation error under win32-x86
From: Ron Sluiter <[email protected]>
To: Wang Xiaoqiang <[email protected]>
Cc: epics <[email protected]>
Date: Mon, 20 Apr 2009 09:21:49 -0500
Hello Wang,

I am guessing that it is the preprocessor assertions (e.g., #cpu(i386))
that are not supported by MSVC.

I suggest you test this by removing them from the file (motor.h)
and recompiling.  The preprocessor variables MSB_First and
LSB_First may not be correct, but at least we will know what
exactly is not supported.

Ron

Wang Xiaoqiang wrote:
Hi,

When I compile motor 6-4-2 under win32-x86 with vs2008 (cl version
14.00.50727.762), it reports the following errors:

make[1]: Entering directory
`/c/epics/synApps_5_4/support/motor/6-4-2/motorApp/MotorSrc/O.win32-x86'
Installing generic include file ../../../include/motor.h
cl /nologo /EHsc /GR -c                /D_CRT_SECURE_NO_DEPRECATE
/D_CRT_NONSTDC_NO_DEPRECATE /D__STDC__=0   /Ox /GL   /W3 /w44355
/MT -DEPICS_DLL_NO   -I. -I..\\O.Common -I. -I..
-I..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\include
-Ic:\\epics\\synApps_5_4\\support\\asyn\\4-10\\include
-Ic:\\epics\\synApps_5_4\\support\\seq\\2-0-12\\include
-Ic:\\epics\\base-3.14.10\\include\\os\\WIN32
-Ic:\\epics\\base-3.14.10\\include
-Ic:\\epics\\synApps_5_4\\support\\motor\\6-4-2\\include       /Tp
..\\motorRecord.cc
motorRecord.cc
c:\epics\synapps_5_4\support\motor\6-4-2\motorapp\motorsrc\motor.h(126)
: error C2014: preprocessor command must start as first nonwhite space
c:\epics\synapps_5_4\support\motor\6-4-2\motorapp\motorsrc\motor.h(126)
: fatal error C1017: invalid integer constant expression
make[1]: *** [motorRecord.obj] Error 2
make[1]: Leaving directory
`/c/epics/synApps_5_4/support/motor/6-4-2/motorApp/MotorSrc/O.win32-x86'
make: *** [install.win32-x86] Error 2

In motor.h(126): #if defined(_WIN32) || #cpu(i386) || defined (_M_IX86)
|| defined (_X86_), the #cpu(i386) assertion confuses compiler. If I split it over two lines
then it works.
#if defined(_WIN32) || defined (_M_IX86) || defined (_X86_)
    #define LSB_First (TRUE)  /* LSB is packed first. */
#elif #cpu(i386)
    #define LSB_First (TRUE)  /* LSB is packed first. */
It seems MSVC does not accept directives mixed.

--
Dr. Xiaoqiang Wang
Paul Scherrer Institut, WBGB/010
5232 Villigen PSI, Switzerland



Replies:
RE: Motor record compilation error under win32-x86 Wang Xiaoqiang
References:
Motor record compilation error under win32-x86 Wang Xiaoqiang

Navigate by Date:
Prev: RE: Problems using the sscan record Mark Rivers
Next: RE: Motor record compilation error under win32-x86 Wang Xiaoqiang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Motor record compilation error under win32-x86 Wang Xiaoqiang
Next: RE: Motor record compilation error under win32-x86 Wang Xiaoqiang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·