Asked by:
LNK2038 with xapobase.lib in ARM-configuration - wrong LIB-files?

Question
-
Hello,
I'm build a metro-app that is using XAudio2-Effects. When I try to link the ARM-configuration I get the follwoing error:
1>xapobase.lib(oapmatrixmix.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in App.xaml.obj
WIN32 and x64 configurations work well. Is something wrong with the LIB? The linker is takting the LIB from follwing location:
"C:\Program Files (x66)\Windows Kits\8.0\Lib\win8\um\arm"
(temporarily renamed it and linker stopped with 'lib not found') This sounds right for me. Im using Windows 8 Release Preview (Buidl 8400) and VS Professional 2012 RC (Version 11.0.50522.1 RCREL)
Thanks for any answer.
Monday, June 18, 2012 2:12 PM
All replies
-
I tested the XAduio-Stream-Effect sample from following. I can compile it with ARM-configuration.
http://code.msdn.microsoft.com/XAudio2-Stream-Effect-3f95c8f2
So could you please provide the detail steps on the local repro.
Best Regards,
Han XiaTuesday, June 19, 2012 3:09 AMModerator -
Hello Han Xi,
Thank you for reply. I can compile the linked sample, but this isn't amazing because it doesn't use "xapobase.lib". The described linker-error appears whenever you implement a derivate of class CXAPOBase. (see http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.cxapobase.cxapobase_members%28v=vs.85%29.aspx)
Then you have to add "xapobase.lib" to your additional libraries or have to add:
#pragma comment( lib, "xapobase.lib")
to your sources and you will get the same error.
Can you reproduce this?
Thanks and best regards!
Wednesday, June 20, 2012 2:02 PM -
Hello,
Are there any news about this issue? I hoped to get it fixed with RTM and latest versions of visual studio but it remains the same.
Other developer seem to experience the problem too:
http://www.win8heads.com/metro-style-apps-c/21689-lnk2038-xapobase-lib-arm-configuration-wrong-lib-files.html
Thanks and best regards!
Friday, August 24, 2012 10:34 AM -
I'm having the same problem too.
Filip Skakun
Friday, October 12, 2012 11:20 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
- Proposed as answer by Filip Skakun Tuesday, October 16, 2012 11:22 PM
Tuesday, October 16, 2012 11:22 PM -
I am seeing almost the same issue when I convert many of Charles Petzold's projects from MSDN magazine. It seems pretty clear that the ARM version of XAPOBASE.LIB is being compiled from older code. The message I am getting is
1>xapobase.lib(oapmatrixmix.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in AmplitudeEnvelopeEffect.obj
I a whole generation newer than the tool sets that Filip was using above. I am able to convert the project successfully when running on X86, but when I try to deploy on ARM I am hitting this issue. I am using Visual Studio 2013 Update 3 RTM to perform the conversion from 8.0 to 8.1.
The Petzold project that I am converting is "AnalogSynth".
The code can be downloaded from http://msdn.microsoft.com/en-us/magazine/msdnmag0713.aspx
The MSDN article is at http://msdn.microsoft.com/en-us/magazine/dn296556.aspx
Steps to repro:
1. Download code from MSDN
2. Open project in VS2013 Update 3
3. Rebuild the project after targeting ARM
I actually get 3 different error messages in this case:
1>xapobase.lib(oapmatrixmix.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1800' in AmplitudeEnvelopeEffect.obj
1>xapobase.lib(oapmatrixmix.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AmplitudeEnvelopeEffect.obj
1>xapobase.lib(oapmatrixmix.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AmplitudeEnvelopeEffect.obj
All of these errors seem to indicate that an older version of XAPOBASE.LIB is being installed as part of the SDK.
I tried patching XAPOBASE.LIB in the C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\arm directory, as recommended above. It resolved only the first of the three errors shown here.
Is there any possible workaround?
Thanks,
David
- Proposed as answer by tomi.lee.jones Sunday, March 29, 2015 11:25 PM
- Unproposed as answer by tomi.lee.jones Sunday, March 29, 2015 11:25 PM
Wednesday, August 6, 2014 10:29 PM -
I tried patching XAPOBASE.LIB in the C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\arm directory, as recommended above. It resolved only the first of the three errors shown here.
Is there any possible workaround?
Thanks,
David
'_MSC_VER' error can be easily fixed by binary editing the XAPOBase.lib and changing "_MSC_VER=1700" to "_MSC_VER=1800"
Other two mismatches ( '_ITERATOR_DEBUG_LEVEL' and 'RuntimeLibrary') are gone when building in RELEASE mode :)
Sunday, March 29, 2015 11:31 PM -
Note that the _MSC_VER/_ITERATOR_DEBUG_LEVEL issue is fixed in the Windows 8.1 SDK / Windows Phone 8.1 SDK that ships with VS 2015 and VS 2013 Update 5.
- Edited by Chuck Walbourn - MSFTMicrosoft employee Thursday, April 30, 2015 1:11 AM
Thursday, April 30, 2015 1:09 AM