Microsoft KB Archive/890079

= FIX: Linker errors occur when you compile Windows Media Digital Rights Management applications =

Article ID: 890079

Article Last Modified on 10/26/2007

-

APPLIES TO


 * Windows Media Format 9.5 Software Development Kit

-





SYMPTOMS
When you compile Microsoft Windows Media Digital Rights Manager (WMDRM) applications that link to both the Mssachlp.lib file and the WMStubDRM.lib file, you may receive the following error messages:

WMStubDRM_ .lib(drmso.obj) : error LNK2005: _pfnSetSecret already defined in mssachlp.lib(drmstub.obj)

WMStubDRM_ .lib(drmso.obj) : warning LNK4006: _pfnSetSecret already defined in mssachlp.lib(drmstub.obj); second definition ignored

Creating library Debug/test.lib and object Debug/test.exp

Debug/test.exe : fatal error LNK1169: one or more multiply defined symbols found



CAUSE
This problem occurs because some symbols are defined in both libraries.



RESOLUTION
To resolve this problem, follow these steps:  At a command prompt, change to the SDK library directory. For example, change to the C:\Wmsdk\Wmfsdk95\Wmdm\Lib directory. In a text editor such as Notepad, create a file. Name the file Makelib.cmd.  Add the following code to your Makelib.cmd file. @echo off if &quot;%1&quot; ==&quot;&quot; goto Usage if &quot;%2&quot; ==&quot;&quot; goto Usage if EXIST %2 del %2

set BASE_OBJ_PATH=obj\i386 set OBJS=dummy mssachlp umkm rc4safe seed cpu circhash vlhash randlib aesbox aes cfb modes uint4 shan shaconst sha512 sha256 sha spb desx deslm desport deskey benaloh rsa_pub rsa_prv rsa_math rsa_gen rsa_key rsa_fast msrc4 msrc2 hmac md5c md4ms md4 md2const md2 rsa_port cdeclstu rc4fast rc2fast desfast shans shafast md5fast md4fast rsafast

for %%i in (%OBJS%) do (     lib /EXTRACT:%BASE_OBJ_PATH%\%%i.obj %1 >NUL

if EXIST %2 (         lib /OUT:%2 %2 %%i.obj >NUL     ) else (         lib /OUT:%2 %%i.obj >NUL     ) del %%i.obj )

echo Generated %2 from %1 goto Done


 * Usage

echo &quot;Usage: makelib .lib where   is a unique version of the library. This unique version of the library is registered to a specific company.

Additional query words: WMRM WMDRM linker MSSACHLP.lib WMStubDRM.lib

Keywords: kbfix KB890079

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.