FIX: Linker errors occur when you compile Windows Media Digital Rights Management applications (890079)
The information in this article applies to:
- Microsoft Windows Media Format 9.5 SDK
SYMPTOMSWhen 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_xxxxx.lib(drmso.obj) : error LNK2005: _pfnSetSecret already defined in mssachlp.lib(drmstub.obj) WMStubDRM_xxxxx.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 CAUSEThis problem occurs because some symbols are defined in both libraries.RESOLUTIONTo 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 "%1" =="" goto Usage
if "%2" =="" 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 "Usage: makelib <source lib> <target lib>"
goto Done
:Done
@echo on
- Save your Makelib.cmd file to directory that you changed to in step 1.
- At the command prompt, run the following command.
makelib.cmd mssachlp.lib mssachlp_min.lib - In your Makelib.cmd file, locate the following code.
mssachlp_min.lib - Replace the code that you located in step 6 with the following code.
mssachlp.lib - Rebuild your application.
STATUS Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. MORE INFORMATIONThe WMStubDRM.lib file is licensed individually to companies that are developing WMDRM solutions. Typically, the file is distributed as WMStubDRM_xxxxx.lib where xxxxx is a unique version of the library. This unique version of the library is registered to a specific company.
Modification Type: | Major | Last Reviewed: | 11/17/2004 |
---|
Keywords: | kbfix KB890079 kbAudDeveloper |
---|
|