none
Why can I not open ctlutil.cpp RRS feed

  • Question

  • I have added the file ctlutil.cpp to the IDE and set the correct file path in additional include directories but I get this  error:

       fatal error C1083: Cannot open source file: '..\..\..\..\Microsoft Press\Programming DirectShow\Downloaded extras\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\ctlutil.cpp': No such file or directory    c1xx  

    I know the file definitely exists because I added it to the IDE (VS 2005) and  I can view the code in visual studio 2005 so why can't it open the file.

    The header file ctlutil.h is included in the build.

     

    I moved the directshow baseclass directory to the first position of the additional include directories list but that didn't work.

    Why won't it open. Could the reason  be something about the precompiled header?

    I use XP with service pack 2

    Any suggestions will be appreciated.

    Thanks

     


    William S Hendrie
    Tuesday, January 4, 2011 8:58 PM

Answers

  • Since you can not add a file to the IDE, what do you mean by that?

    And what do you mean by "can't open" when you said you viewed it, which implies opening it?

    And what has a .cpp got to do with the include dirs or the PCH?

    Last, why are you using the copy of the BaseClasses that came with the book and is ancient instead of the original and newer one in the Windows SDK?


    MVP :: DirectShow / MediaFoundation <http://www.riseoftheants.com/mmx/faq.htm>
    • Marked as answer by Will Hendrie Wednesday, January 5, 2011 3:01 PM
    Tuesday, January 4, 2011 10:08 PM

All replies

  • Since you can not add a file to the IDE, what do you mean by that?

    And what do you mean by "can't open" when you said you viewed it, which implies opening it?

    And what has a .cpp got to do with the include dirs or the PCH?

    Last, why are you using the copy of the BaseClasses that came with the book and is ancient instead of the original and newer one in the Windows SDK?


    MVP :: DirectShow / MediaFoundation <http://www.riseoftheants.com/mmx/faq.htm>
    • Marked as answer by Will Hendrie Wednesday, January 5, 2011 3:01 PM
    Tuesday, January 4, 2011 10:08 PM
  • Will Hendrie wrote:
    >
    >I have added the file ctlutil.cpp to the IDE and set the correct file
    >path in additional include directories but I get this error:
    >
    >fatal error C1083: Cannot open source file: '..\..\..\..\Microsoft Press\Programming DirectShow\Downloaded extras\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\ctlutil.cpp': No such file or directory c1xx
     
    That's silly. Why don't you just copy the file(s) into your project
    directory? Those files are samples, as the pathname says.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP
    Wednesday, January 5, 2011 7:04 AM
  •  

    I meant that I added the file cllutil.cpp to the source file list in Solution Explorer. IDE was a poor choice of terms.

    The compiler error message  was that it couldn't open the file even when the file was already in the project. The complier error was C1083 and MSDN reference(msdn.microsoft.com/en-us/library/et4zwx34.aspx) for that error says that  that error might be caused by a PCH error. (I was grasping at straws).

     

    I changed the source of ctlutil.cpp  to Windows SDK and the error went away as you suggested.

     

    Thanks very much.

    Will


    William S Hendrie
    Wednesday, January 5, 2011 3:00 PM
  • I will do that in future.

    Thanks.

    Will


    William S Hendrie
    Wednesday, January 5, 2011 3:07 PM