locked
error C3861: 'CoCreateInstanceFromApp': indentifier not found

    Question

  • Hi,

    I'm trying to create a Windows Runtime Component in C++ for a Metro style app. I'm using portions of the OpenCV library that I compiled myself in visual studio, specially the core and imgproc modules. When I try to build the component I get:

    error C3861: 'CoCreateInstanceFromApp': indentifier not found

    Any ides why?

    I tried to use the basics of OpenCV, the core and imgproc modules don't have any dependencies on ffmpeg or external libraries.

    Thank you!

    Andrew

    Tuesday, August 7, 2012 12:25 AM

Answers

  • It's listed as a Windows Store compatible api. Are you including the combaseapi.h header?
    • Marked as answer by awm33drexel Tuesday, August 7, 2012 2:01 AM
    Tuesday, August 7, 2012 1:14 AM
    Moderator

All replies

  • It's listed as a Windows Store compatible api. Are you including the combaseapi.h header?
    • Marked as answer by awm33drexel Tuesday, August 7, 2012 2:01 AM
    Tuesday, August 7, 2012 1:14 AM
    Moderator
  • Hi Steve,

    Thanks, that got rid of that error. "It's listed as a Windows Store compatible api." - is there a list of compatible apis?

    But now I'm getting a FileNotFoundException after it tries to load the .winmd file

    -Andrew

    Tuesday, August 7, 2012 2:03 AM
  • Nevermind got it to work. I had to copy the opencv dll files to the AppX folder
    Tuesday, August 7, 2012 2:57 AM