locked
Errors compiling wdpsamples RRS feed

  • Question

  • I am trying to build the WdpSamples from the WDK in VS 2012 and it is generating lots of errors relating to ATL (see below for examples) wondering if anyone knows the fix for this?

    Error 1 error C2065: 'SAL_2_Clean_Violation_using__out' : undeclared identifier C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlwinverapi.h 71 1 WpdHealthBloodPressureService
    Error 2 error C2146: syntax error : missing ')' before identifier 'LPCRITICAL_SECTION' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlwinverapi.h 71 1 WpdHealthBloodPressureService
    Error 4 error C2433: '_AtlInitializeCriticalSectionEx' : 'inline' not permitted on data declarations C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlwinverapi.h 71 1 WpdHealthBloodPressureService


    oregonduckman

    Saturday, September 14, 2013 12:05 AM

Answers

  • Ah, I replied to your other post without realizing you're referring to the Bluetooth Gatt WPD samples.

    Try removing _USE_SAL2_ONLY from the preprocessor definitions in each VC project's properties, and then rebuild the solution.

    Regards,

    lisa

    Monday, September 16, 2013 5:13 AM

All replies

  • Were you using the Win 8 WDK?  The SAL annotations have changed dramatically in each of the previous WDK releases.  If you mix an older WDK with a new SDK, you can get mismatches.

    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.

    Sunday, September 15, 2013 4:34 AM
  • Ah, I replied to your other post without realizing you're referring to the Bluetooth Gatt WPD samples.

    Try removing _USE_SAL2_ONLY from the preprocessor definitions in each VC project's properties, and then rebuild the solution.

    Regards,

    lisa

    Monday, September 16, 2013 5:13 AM
  • Seems like I had a bad VS 2012 install since a reinstalling fixed the problem. Thanks for everyones help on this.

    oregonduckman

    Tuesday, September 17, 2013 5:52 PM
  • The problem surfaced again this time I followed your advice and removed the _USE_SAL2_ONLY from the preprocessor definitions and the project built just fine, thanks for the answer.

    oregonduckman

    Tuesday, September 24, 2013 8:53 PM