mmsystem.h and link error

This is a discussion on mmsystem.h and link error within the Windows Programming forums, part of the Platform Specific Boards category; Hi, i just added #include <mmsystem.h> and now i am getting heapssss of link errors? MainFrm.obj : error LNK2005: _IID_IAudioExternalSynthesizer ...

  1. #1
    swordfish
    Guest

    Angry mmsystem.h and link error

    Hi, i just added

    #include <mmsystem.h>

    and now i am getting heapssss of link errors?

    MainFrm.obj : error LNK2005: _IID_IAudioExternalSynthesizer already defined in in6.obj
    MainFrm.obj : error LNK2005: _IID_ITTSExternalSynthesizerA already defined in in6.obj
    MainFrm.obj : error LNK2005: _IID_ITTSExternalSynthesizerW already defined in in6.obj
    MainFrm.obj : error LNK2005: _CLSID_SynthEngineEnumerator already defined in in6.obj
    MainFrm.obj : error LNK2005: _CLSID_SynthEngine already defined in in6.obj
    MainFrm.obj : error LNK2005: _CLSID_SynthAudioDest already defined in in6.obj
    MainFrm.obj : error LNK2005: _IID_IAudioTel already defined in in6.obj
    MainFrm.obj : error LNK2005: _IID_IAudioSourceLog already defined in in6.obj
    MainFrm.obj : error LNK2005: _IID_ISTLog already defined in in6.obj

    and more?

    why is it?
    how should i resolve it?

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Do you have a source file named in6.cpp?
    // Gliptic

  3. #3
    swordfish
    Guest
    Yep, and that when errors came, when i inserted that file to current project. There are two file in6.h and in6.cpp, and error comes only in code for playing the sound.

  4. #4
    Xterria
    Guest
    include 'winmm.lib' under 'Project->Settings' for MSVC++

  5. #5
    Registered User Esss's Avatar
    Join Date
    Aug 2001
    Posts
    133
    Do you have INITGUID defined somewhere? These errors usually occur when you have INITGUID defined in all source files. It should be defined for one only.
    Ess
    Like a rat in a maze who says,
    "Watch me choose my own direction"
    Are you under the illusion
    The path is winding your way?
    - Rush

  6. #6
    Unregistered
    Guest
    The links errors went away, don't know how, but these come now

    new1View.obj : error LNK2001: unresolved external symbol _CLSID_MMAudioDest
    new1View.obj : error LNK2001: unresolved external symbol _IID_IAudioMultiMediaDevice
    new1View.obj : error LNK2001: unresolved external symbol _CLSID_TTSEnumerator
    new1View.obj : error LNK2001: unresolved external symbol _IID_ITTSFindW
    Debug/new1.exe : fatal error LNK1120: 4 unresolved externals

    don't know why? Ands its only INITGUID.h once.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. graphics.h link error
    By aristotle1 in forum C Programming
    Replies: 4
    Last Post: 02-25-2010, 10:11 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  3. Link Error
    By Luigi in forum C++ Programming
    Replies: 1
    Last Post: 04-12-2004, 08:12 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Greenhand want help!
    By leereg in forum C Programming
    Replies: 6
    Last Post: 01-29-2002, 06:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21