Log in

View Full Version : Compilation errors


endasil
07-13-2004, 03:06 AM
I'm not sure what type of information you need to help me with this, but here is a list of the error messages i get when i try to compile. Any suggestions on how i should go about to locate the error? Have been trying for a couple of hours now...


Project Lek error LNK2005: _AM_INTERFACESETID_Standard already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_AUDIO already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_CAPTURE already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_CROSSBAR already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_DATACOMPRESSOR already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_RENDER already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_SPLITTER already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_TVAUDIO already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_TVTUNER already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_VBICODEC already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSCATEGORY_VIDEO already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSPROPSETID_AC3 already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSPROPSETID_CopyProt already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSPROPSETID_DVD_RateChange already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSPROPSETID_DvdKaraoke already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSPROPSETID_DvdSubPic already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSPROPSETID_FrameStep already defined in DShowClass.obj
Project Lek error LNK2005: _AM_KSPROPSETID_TSRateChange already defined in DShowClass.obj
Project Lek error LNK2005: _AMPROPSETID_Pin already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_ACMWrapper already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_ActiveMovieCategories already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AllocPresenter already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AllocPresenterDDXclMode already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AnalogVideoDecoderPropertyPage already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AsyncReader already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_ATSCNetworkPropertyPage already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_ATSCNetworkProvider already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioCompressorCategory already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioInputDeviceCategory already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioInputMixerProperties already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioProperties already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioRecord already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioRender already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioRendererAdvancedProperties already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AudioRendererCategory already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AVICo already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AVIDec already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AviDest already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AVIDoc already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AVIDraw already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AVIMIDIRender already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AviMuxProptyPage already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AviMuxProptyPage1 already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AviReader already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_AviSplitter already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CAcmCoClassManager already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CameraControlPropertyPage already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CaptureGraphBuilder already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CaptureGraphBuilder2 already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CaptureProperties already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CDeviceMoniker already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CIcmCoClassManager already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CMidiOutClassManager already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CMpegAudioCodec already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CMpegVideoCodec already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_Colour already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CQzFilterClassManager already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CrossbarFilterPropertyPage already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CVidCapClassManager already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CWaveinClassManager already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_CWaveOutClassManager already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_DeviceControlCategory already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_DirectDraw already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_DirectDrawClipper already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_DirectDrawProperties already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_Dither already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_DShowTVEFilter already defined in DShowClass.obj
Project Lek error LNK2005: _CLSID_DSoundRender already defined in DShowClass.obj

Matthijs Hollemans
07-13-2004, 04:07 AM
The errors are caused because somewhere in your code you are duplicating symbols that are already defined in DShowClass (or rather, the file that this class is declared in), which I suppose is of your own creation.

From the information you provided, I can't exactly tell what you are doing wrong, but it's probably one of the following:

- You are putting variabele definitions in your .h file. You should always put variables in a .cpp file and only add an "extern" declaration to the .h file (if necessary).

- You are #including a .cpp file. You should only #include .h files.

CrystalSquid
07-13-2004, 05:51 AM
I have a vuage recollection of a define you should put in before including the DX stuff (DirectShow has always been a shoddy bolt-on to DX).

Something like DX_GUID I think it was.

Searching on the MS developer support might turn something up.

wazoo
07-13-2004, 06:20 AM
CrystalSquid I think you're talking about the
#define INITGUID

But if you link your project with dxguid.lib then you don't need the #define

hth

CrystalSquid
07-13-2004, 10:51 AM
Thats the thingy!

Thinking about it - don't think it will help, sorry!

One more thought just popped into my head - you may be trying to link a library twice.

You should ba able to set the linker to 'verbose' and it should tell you all the libs it links with. Check if DShow.lib is occuring twice :)

endasil
07-18-2004, 06:00 AM
Thank you for your help! I succceded to get it working. What i did was to remove the #define INITGUID and instead include the dxguid.lib and it worked! Would never have tried this without your help guys! Thanks alot! :D