   Undefined Reference to CoInitialize()
  I am using Code::Blocks IDE with MinGW compiler.  I am trying to use direct x for a sound program I am making.  Whenever I go to compile I get the following messages:.objs\C3DSound.o:C3DSound.cpp:(.text+0x1e5): undefined reference to `GUID_NULL'.objs\CDXAudio.o:CDXAudio.cpp:(.text+0x66): undefined reference to `CoInitialize@4'.objs\CDXAudio.o:CDXAudio.cpp:(.text+0xab): undefined reference to `CoCreateInstance@20'.objs\CDXAudio.o:CDXAudio.cpp:(.text+0xed): undefined reference to `CoCreateInstance@20'.objs\CDXAudio.o:CDXAudio.cpp:(.text+0x23a): undefined reference to `CoUninitialize@0'I have included the dxguid.lib from the Microsoft Direct X sdk.  I have used reimp on all the other library files I needed for this program that were from Microsoft's Direct X SDK, but whenever I use reimp for dxguid.lib, it only gives me an .obj file.  Can anyone help me with this.  It seems to me that CoInitialize() and the other functions are either not in dxguid.lib, or that the MinGW compiler cannot parse the .lib file correctly. -Sean-   
  I really need help on this...Is it possible to link to the object files or will they not work right?   ;  CoInitialize and all of the other associated COM functions are defined in ole32.lib, not dxguid.lib, so you need to link with ole32.lib as well.   