locked
Error building an app using XAudio2/XAPO for ARM platform

    Question

  • I'm getting this error when I try to build an app using the XAPOBASE.LIB for ARM architecture:

    xapobase.lib(oapmatrixmix.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in AudioEngine.obj

    It seems like that problem was reported before in another forum but to no answer.


    Filip Skakun

    Saturday, October 13, 2012 12:25 AM

Answers

  • Success! I fixed the issue by simply binary editing xapobase.lib and replacing
    /FAILIFMISMATCH:"_MSC_VER=1600"
    with
    /FAILIFMISMATCH:"_MSC_VER=1700"

    :)


    Filip Skakun

    • Marked as answer by Filip Skakun Tuesday, October 16, 2012 11:21 PM
    Tuesday, October 16, 2012 11:21 PM

All replies

  • Hi,

    What's the version of your Visual Studio and your system?

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Monday, October 15, 2012 5:56 AM
    Moderator
  • 11.0.50727.1 RTMREL

    Visual C++ 04940-004-0038003-02139


    Filip Skakun

    Monday, October 15, 2012 6:03 AM
  • Is the source code for CXAPOParametersBase available somewhere perhaps? It seems like it might be a simple class for anyone to rebuild for different platforms.

    Filip Skakun

    Monday, October 15, 2012 9:10 PM
  • This is a specific issue when using DirectXMath (it's actually stdint.h) with the static library XAPOBASE.LIB on the ARM target. We should have this fixed in a future update of the Windows SDK, but you can work around it by defining the preprocessor symbol _ALLOW_MSC_VER_MISMATCH for your project.
    Monday, October 15, 2012 10:25 PM
  • Thanks Chuck,

    I tried that but it does not seem to help unfortunately.


    Filip Skakun

    Monday, October 15, 2012 11:15 PM
  • Hmm.. You have to rebuild your entire project with it defined.
    Tuesday, October 16, 2012 12:25 AM
  • My solution is multiple C# projects and this XAudio2 C++ & C++/CX library. I did try rebuilding with it set in my library project C++ Preprocessor Definitions (_WINRT_DLL;NDEBUG;_ALLOW_MSC_VER_MISMATCH;%(PreprocessorDefinitions)), as well as pch.h (#define _ALLOW_MSC_VER_MISMATCH). I still get the error.

    Filip Skakun

    Tuesday, October 16, 2012 6:47 AM
  • Are you using DirectXMath in the C++ code?
    Tuesday, October 16, 2012 7:08 AM
  • Not at all. These are my pch references:

    #define _ALLOW_MSC_VER_MISMATCH
    
    #include <wrl.h>
    
    #include <memory>
    #include <list>
    #include <map>
    #include <vector>
    
    #include <mfapi.h>
    #include <mfidl.h>
    #include <mfreadwrite.h>
    #include <xaudio2.h>

    If you want - I can email you the code for the library, it is fairly small. It is just an XAudio2 wrapper for my music app that is otherwise coded in C# & XAML.

    Filip Skakun

    Tuesday, October 16, 2012 4:04 PM
  • Success! I fixed the issue by simply binary editing xapobase.lib and replacing
    /FAILIFMISMATCH:"_MSC_VER=1600"
    with
    /FAILIFMISMATCH:"_MSC_VER=1700"

    :)


    Filip Skakun

    • Marked as answer by Filip Skakun Tuesday, October 16, 2012 11:21 PM
    Tuesday, October 16, 2012 11:21 PM
  • Yeah, that works too :>
    Wednesday, October 17, 2012 12:21 AM