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  2015  2016  2017  2018  2019  <20202021  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  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Windows build problem
From: Freddie Akeroyd - UKRI STFC via Tech-talk <tech-talk at aps.anl.gov>
To: "Heesterman, Peter J" <Peter.Heesterman at ukaea.uk>, Mark Rivers <rivers at cars.uchicago.edu>
Cc: 'tech-talk' <tech-talk at aps.anl.gov>
Date: Fri, 26 Jun 2020 11:36:13 +0000

Hi Mark,

 

I look to have the same SDK version on my computer, and if it is identical to yours it seems the statement involved is

 

        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE createProcessingInstruction(

            /* [in] */ BSTR target,

            /* [in] */ BSTR data,

            /* [retval][out] */ IXMLDOMProcessingInstruction **pi) = 0;     // this line is 1506

 

So a guess would be that the type “IXMLDOMProcessingInstruction” has not been defined correctly. Earlier in the file this is part of a “typedef interface” statement and I believe “interface” is usually defined as “struct”, but the error message talks about the word 'constant' so maybe somewhere “interface” is being defined as “constant” (or something including the word “constant”)? It might be you need to look at the output of the C pre processor stage to see exactly what is going on there.

 

Windows SDKs can do various different things depending on the value of the  NTDDI_VERSION, _WIN32_WINNT, WINVER etc. defines - are any of these being explicitly set?

 

Regards,

 

Freddie

 

From: Heesterman, Peter J <Peter.Heesterman at ukaea.uk>
Sent: 26 June 2020 09:42
To: Mark Rivers <rivers at cars.uchicago.edu>; Akeroyd, Freddie (STFC,RAL,ISIS) <freddie.akeroyd at stfc.ac.uk>
Cc: 'tech-talk' <tech-talk at aps.anl.gov>
Subject: RE: Windows build problem

 

Hi Mark,

 

What code do you have in the file, prior to the fragment you’ve copied below?

Are you #including any other files, before <windows.h> ?

 

Windows.h uses the pre-processor for … well … just about everything.

 

If you have any clashing pre-processor defines exported from an earlier #include, trouble.

 

Cheers,

 

Peter.

 

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: 25 June 2020 23:47
To: 'Freddie Akeroyd - UKRI STFC' <freddie.akeroyd at stfc.ac.uk>; Heesterman, Peter J <Peter.Heesterman at ukaea.uk>
Cc: 'tech-talk' <tech-talk at aps.anl.gov>
Subject: Windows build problem

 

Hi Freddie and Peter,

 

I am having a Windows build problem I hope you can help me with.

 

I am working on the TomoPy project which involves tomography reconstruction in Python.  Recently I built tomopy from source, which required me to update my Visual Studio 2017 Community installation because it wanted this version of the runtime.

 

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023

 

That worked fine, and I was able to build TomoPy with Visual Studio 2017.

 

However, now I am having problems with Visual Studio 2015 on the same machine. I can build EPICS base fine.  However, when I try to build a program of my own that uses the EPICS build system but not EPICS functions in this file I get the following error:

 

cl -EHsc -GR                -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE   -Ox -GL -Oy-   -W3 -w44355 -w44344        -MT -DEPICS_BUILD_DLL -TP  -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/msvc -I../../../include/os/WIN32 -I../../../include -IH:/epics/base-3.15.5/include/compiler/msvc -IH:/epics/base-3.15.5/include/os/WIN32 -IH:/epics/base-3.15.5/include        -c ../grid.cpp

grid.cpp

c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\msxml.h(1506): error C2143: syntax error: missing ')' before 'constant'

c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\msxml.h(1506): error C2143: syntax error: missing ';' before 'constant'

c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\msxml.h(1506): error C2059: syntax error: 'constant'

c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\msxml.h(1506): error C2059: syntax error: ')'

c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\msxml.h(1506): error C2238: unexpected token(s) preceding ';'

../grid.cpp(120): warning C4244: '=': conversion from 'float' to 'long', possible loss of data

 

The code that is being compiled when it fails is this:

#ifdef _WIN32

  #include <windows.h>

  static LARGE_INTEGER countsPerSecond;

  static double getCurrentTime() {

    LARGE_INTEGER count;

    if (countsPerSecond.QuadPart == 0) QueryPerformanceFrequency(&countsPerSecond);

    QueryPerformanceCounter(&count);

    return double(count.QuadPart)/countsPerSecond.QuadPart;

  }

 

It is the include <windows.h> that is causing the problem.  If I remove it I get different problems because Windows functions are undefined.

 

The directory with the file causing the problems is c:\program files (x86)\windows kits\10\include\10.0.17763.0.  That dates from June 22, 2020, which is when I updated Visual Studio 2017.

 

Any idea how I can fix this?

 

Thanks,

Mark

 

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI.


References:
Windows build problem Mark Rivers via Tech-talk
RE: Windows build problem Heesterman, Peter J via Tech-talk

Navigate by Date:
Prev: RE: Windows build problem Heesterman, Peter J via Tech-talk
Next: Re: Windows build problem Mark Rivers via Tech-talk
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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Windows build problem Heesterman, Peter J via Tech-talk
Next: Re: Windows build problem Mark Rivers via Tech-talk
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  <20202021  2022  2023  2024 
ANJ, 26 Jun 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·