LNK2005 with initguid.h & speech.h

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steve Perrins (support_at_scp-computers.co.uk)
Date: 09/08/04


Date: Wed, 8 Sep 2004 17:14:21 +0100

I've just purchased a new PC with XP pro and installed visual C++ V6.0
SP5.0. One of the projects I have been working on will not compile on the
new PC due to numerous LNK2005 errors. The old PC was running Windows ME.

The header file contains the following includes :-

#include <mmsystem.h>
#include <initguid.h>
#include <objbase.h>
#include <objerror.h>
#include <ole2ver.h>
#include <speech.h>
#include "resource.h" // main symbols
#include "Ai2Glbl.h"

The link errors are all related to SAPI 4.0 functions :-
Ai2HttpPostDlg.obj : error LNK2005: _IID_IAudioExternalSynthesizer already
defined in Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ITTSExternalSynthesizerA already
defined in Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ITTSExternalSynthesizerW already
defined in Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_SynthEngineEnumerator already
defined in Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_SynthEngine already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_SynthAudioDest already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_IAudioTel already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_IAudioSourceLog already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ISTLog already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ISTTTSQueueNotifySink already
defined in Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ISTTTSQueue already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ISTGramComp already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ISTRecordNotifySink already defined
in Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _IID_ISTRecord already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_STRecord already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_AudioDestTel already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_AudioSourceTel already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_AudioSourceLog already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_STLog already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_STTTSQueue already defined in
Ai2HttpPost.obj
Ai2HttpPostDlg.obj : error LNK2005: _CLSID_STGramComp already defined in
Ai2HttpPost.obj

these are just a few of the 347 errors reported at build time.

Any help would be greatly appreciated as this is slowly driving me mad.

Thanks,

Steve Perrins.



Relevant Pages

  • Re: Need a FORTRAN compiler for Win7 (or XP)
    ... (except for storage of alphanumeric strings as floating point ... I wouldn't worry to much about the OCR errors that I see. ... The next compile might even not even show errors. ... I have version 6.0 of FineRead, but am interested in 9.0, their pro version. ...
    (comp.lang.fortran)
  • Re: MDE and runtime
    ... MDE from 2003. ... each of Office 2000 Pro, Office XP Pro, and Office 2003 Pro? ... to install at least Access 2000 and compile MDE using it. ...
    (microsoft.public.access.devtoolkits)
  • Process completed with exit code -2146233082
    ... Hello, folks. ... I'm getting this error from VS .NET when I compile a Solution from ... Visual Build Pro. ... None of our development staff complain they are ...
    (microsoft.public.vsnet.general)
  • Do I *need* XP Pro to use VS.net/IIS?
    ... I do some VB.net development at work using Win2K and VS.net. ... compile via VB.net and test. ... Do I need to upgrade to XP Pro and install ISS to make full use of this, ... I'm OK upping to XP Pro if I have to, ...
    (microsoft.public.vsnet.ide)
  • Re: Linking Problems (libc on VS2005)
    ... Gary Nastrasio wrote: ... I am using Visual Studio 2005 Pro and when I compile, I'm told that the libc.lib library can't be found. ...
    (microsoft.public.vc.language)