Click here to Skip to main content
       

C / C++ / MFC

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: How to determine in runtime the class type of inhetited class from common base class?memberMaximilien27 Feb '13 - 8:02 
I think that at runtime, you will have to use the (slow) dynamic_cast or have the classes know their types via a ID of some sort.
Nihil obstat

QuestionLinker error with CLSID defined in uuids.hmemberVaclav_Sal27 Feb '13 - 5:56 
This is my first code using DirestShow and could use some help with this linker issue.
The “problem “ is that the second usage of   CoCreateInstance with   CLSID parameter of   CLSID_VideoMixingRenderer fails to link.
Here is “standard” linker error:

VMR_Capture.obj : error LNK2001: unresolved external symbol _CLSID_VideoMixingRenderer
Debug/OpenCamera.exe : fatal error LNK1120: 1 unresolved externals
 
I have included Microsoft SDKs\Windows\v7.1\Include\uuids.h and both of these CLSID are defined there.
 
Here is the failing code snippet
   ….     
      hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
                                    IID_IGraphBuilder, (void **)&m_pGB);   // links fine

      if(SUCCEEDED(hr))
      {
            hr = InitializeWindowlessVMR(hWnd);           
     …..
      hr = CoCreateInstance(CLSID_VideoMixingRenderer, NULL,
                                                   CLSCTX_INPROC, IID_IBaseFilter, (void**)&pVmr);
   // fails to link
 
I would appreciate any help/ suggestions on how to troubleshoot this.
 
Thanks for your time.
Vaclav
AnswerRe: Linker error with CLSID defined in uuids.hmvpRichard MacCutchan27 Feb '13 - 6:19 
From the error message above it appears that this CLSID is not defined properly in the header. Check back and see what value it generates.
Use the best guess

GeneralRe: Linker error with CLSID defined in uuids.hmemberVaclav_Sal27 Feb '13 - 6:38 
Richard,
thanks for your advise.
 
I have replaced ( in uuids.h) failing CLSID with working one , same linker error.
Since I do not know squat about this I guess I need to find out what it should be to make this troubleshooting more effective.
 

 
// VMR GUIDS
// -------------------------------------------------------------------------
#pragma message ("CLSID_VideoMixingRenderer")
// {B87BEB7B-8D29-423f-AE4D-6582C10175AC}
OUR_GUID_ENTRY(CLSID_VideoMixingRenderer,
//0xB87BEB7B, 0x8D29, 0x423f, 0xAE, 0x4D, 0x65, 0x82, 0xC1, 0x01, 0x75, 0xAC)
0xe436ebb3, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
 

Addendum
Just changed the CLSID to CLSID_VideoRendererDefault and getting same linker error.
GeneralRe: Linker error with CLSID defined in uuids.hmvpRichard MacCutchan27 Feb '13 - 7:25 
I think you need to include the Strmiids.lib library as described on this MSDN page[^].
Use the best guess

GeneralRe: Linker error with CLSID defined in uuids.hmemberVaclav_Sal27 Feb '13 - 7:39 
The library is inluded. That is why I am lost since one of the CLSID works and the   other does not.
Maybe I should look for #ifdefs in the uudis.h, but the compiler "reported" the #pragma message I stuck in front of the "bad" CLSID.
Go figure.
GeneralRe: Linker error with CLSID defined in uuids.hmvpRichard MacCutchan27 Feb '13 - 9:20 
Vaclav_Sal wrote:
one of the CLSID works and the other does not.
Then the chances are that there is another missing library. Unfortunately I have no experience of this package and only found the answer by searching through the documentation. I am afraid you will have to do the same.
Use the best guess

AnswerRe: Linker error with CLSID defined in uuids.hmemberVaclav_Sal27 Feb '13 - 15:32 
It seems that I need correct Strmiids.lib version.
 
I have changed the path to the latest Strmiids.lib
Mine is in C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib
 
Now I am getting this error:
 
strmiids.lib(strmiids.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Error executing link.exe.
 

Do I have to rebuild the Strmiids.lib
using my VC6.0 from scratch?
 
It would make it easier to step thru if I have a "source" anyway.
AnswerRe: Linker error with CLSID defined in uuids.hmemberSoMad27 Feb '13 - 16:38 
I am afraid I have some bad news for you. Windows SDK 7.1 is not compatible with VC6. Please see the reply to this question: http://social.msdn.microsoft.com/Forums/en/windowssecurity/thread/18990fc3-94c4-41da-bedc-40b9237b8ba0[^]
 
I can understand if you are trying to stay with VC6 for financial reasons, but I have to echo the last line of the response "You should really think about upgrading to a more recent version of the IDE."
 
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

GeneralRe: Linker error with CLSID defined in uuids.hmemberSoMad27 Feb '13 - 18:02 
Don't worry, I will not give you a whole lecture about upgrading, just suggest it. I am using VS2010 and I don't have problems with Windows SDK 7.1, I think Hmmm | :| .
From what I have heard, VS2010 is slower than VS2012, so you might be even more disappointed should you switch to that.
 
I recalled reading a post a few weeks ago in the Lounge by Marc Clifton where he said VS2008 was the last usable IDE put out by Microsoft. I hunted the post down for you in case you are interested: I would have to say...[^]
 
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 24 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid