[wdmaudiodev] Re: AERT_XXX calls linker error for 32-bit build (ok for 64-bit)

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 7 Nov 2018 16:26:38 +0000

Works on 64-bit, but not on 32-bit… smells like a calling convention mismatch. 
What is the default calling convention for your product?

https://msdn.microsoft.com/en-us/library/46t77ak2.aspx
/Gd __cdecl
/Gr __fastcall
/Gv __vectorcall
/Gz __stdcall

I see that baseaudioprocessingobject.h declares AERT_Allocate inside an extern 
“C” { … } block, and audioeng.dll exports AERT_Allocate (without any leading 
underscores.)

Can you share the full error message?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Culann mac Cabe <culann@xxxxxxxxxx>
Sent: Wednesday, November 7, 2018 3:37:54 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] AERT_XXX calls linker error for 32-bit build (ok for 
64-bit)

Hello wdmaudiodev people.

I am using Visual Studio 2017 to develop a Windows APO driver and I am seeing a 
Linker Error (unresolved external symbol 'symbol' referenced in function 
'function<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcpp%2Ferror-messages%2Ftool-errors%2Flinker-tools-error-lnk2019%3Ff1url%3Dhttps%253A%252F%252Fmsdn.microsoft.com%252Fquery%252Fdev15.query%253FappId%253DDev15IDEF1%2526l%253DEN-US%2526k%253Dk(LNK2019)%2526rd%253Dtrue%26view%3Dvs-2017&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C0a177d970142490103e608d644a59f00%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636771875497162572&sdata=qF%2BMmVMJmzSIBwkcL5bAu4NELmB2wajXvhjt2Zg1b2o%3D&reserved=0>')
 associated with a call to the memory allocation function 
AERT_Allocate()<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fdesktop%2Fapi%2Fbaseaudioprocessingobject%2Fnf-baseaudioprocessingobject-aert_allocate%23requirements&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C0a177d970142490103e608d644a59f00%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636771875497172581&sdata=41BgDzY0rUuqLcdnynmkkdwNbltffR9sH8U%2Fco9464M%3D&reserved=0>
 which MS recommends/requires for real time functions...

AERT_Allocate links Audioeng.lib and, simply put, my project links succesfully 
against the 64 bit lib but I get the above Linker error when attempting to link 
against the 32 bit library.  My verbose linker output shows my paths etc to be 
correct, so the issue appears to be related to 64 bit vs 32.

Is this a Visual Studio issue/bug or can anyone provide any 
suggestions/recommendations?

Thanks!
Culann

Other related posts: