locked
error C2146, error C4430, error C4430, error C2065 RRS feed

  • Question

  • Hello!

    I'm getting the following errors when compiling:

    C:\Documents and Settings\USER\Desktop\Repositorio\repositorio\trunk\SipXezPhone\DirectShow\BaseClasses\wxdebug.h(329) : error C2146: syntax error : missing ';' before identifier 'm_pString'
    4>C:\Documents and Settings\USER\Desktop\Repositorio\repositorio\trunk\SipXezPhone\DirectShow\BaseClasses\wxdebug.h(329) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    4>C:\Documents and Settings\USER\Desktop\Repositorio\repositorio\trunk\SipXezPhone\DirectShow\BaseClasses\wxdebug.h(329) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    4>C:\Documents and Settings\USER\Desktop\Repositorio\repositorio\trunk\SipXezPhone\DirectShow\BaseClasses\wxdebug.h(326) : error C2065: 'm_pString' : undeclared identifier

    These are my includes:

    #include "stdwx.h"
    #include "windows.h"
    #include "dshow.h"
    #include "streams.h"

    If anyone knows what I'm doing wrong...

    Thanks in advance.

    Manuela

    Saturday, June 23, 2007 5:17 PM

Answers

All replies

  • The errors C2146 and C4430 can usually be ignored. I know very little about DirectShow but if I were to have this error I would look at something such as http://search.msn.com/results.aspx?q=wxdebug+DirectShow&form=QBRE.

     

    Sunday, June 24, 2007 4:34 AM
  • only need
    #include <streams.h>

    I once encountered such compile error,
    after I  cancelled the other head files, it is ok!
    Monday, October 29, 2007 4:25 PM
  • Great. Could you please tel HOW those errors can be egnored?

    I try to run Intel examples for their IPP ver 5.3.

    I added my class (InserterData) into file utils.h. In file utils.cpp I define an instance of my class:

    #ifdef BR_INSERTER

    InserterData br_inserter;

    #endif

     

    The compilation of the cpp file return the following errors:

    1>umc_utils.cpp

    1>d:\ipp_inserter\ippv5.3_inserter_27112007\h264enc_ipp\src\umc_utils.cpp(20) : error C2146: syntax error : missing ';' before identifier 'br_inserter'

    1>d:\ipp_inserter\ippv5.3_inserter_27112007\h264enc_ipp\src\umc_utils.cpp(20) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    1>d:\ipp_inserter\ippv5.3_inserter_27112007\h264enc_ipp\src\umc_utils.cpp(20) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    1>Build log was saved at "file://d:\IPP_INSERTER\IPPV5.3_INSERTER_27112007\h264enc_ipp\Debug\BuildLog.htm"

    1>h264enc_ipp - 3 error(s), 0 warning(s)

     

    Please help.

    Thanks in advance,

    Friday, December 28, 2007 11:25 AM
  •  Lucia I wrote:
    Great. Could you please tel HOW those errors can be egnored?

    By fixing some other error. These errors are usually the result of some other error(s). If the other thread that I posted a link to does not help you then you have a different problem and you need to create a new thread. Don't reply here; create a new thread and provide more information in the thread you create. There is inadequate information here to help me suggest what other information would help.

     

     Lucia I wrote:
    I try to run Intel examples for their IPP ver 5.3.

    Intel has forums. Often people post questions there. It is likely that the problem has already been asked and answered. So be sure to check the Intel forum(s).

    Friday, December 28, 2007 5:13 PM
  • Neither your odd suggestion (How can one ignore errors causing the project not to compile???) nor the link you posted did contribute anything to solving this problem (or give the slightest hint that you even understood it). Maybe you better concentrate on quality rather than quantity of your posts?

    Anyway, the problem has been around for years, as a google search suggests. Probably the headers of the Platform SDK and DirectX SDK are somewhat broken which leads to the problem that PTCHAR remains undefined. It has been suggested to use the Vista SDK instead, but there are simple hacks to solve these kinds of problems.

    In this case doing a

    typedef _TCHAR *PTCHAR;

    before including the other headers works just fine.
    Tuesday, February 12, 2008 10:12 AM
  •  lingen2 wrote:
    How can one ignore errors causing the project not to compile???

    The answer to that riddle is easy; solve the other errors, and then it is very probable that the erros that can probably be ignored will go away.

     

     lingen2 wrote:

    nor the link you posted did contribute anything to solving this problem (or give the slightest hint that you even understood it).

    Yet the vast majority of people answering questions expect people to do searches such as that before attempting to get help from people voluntarily trying to help.

     

     lingen2 wrote:
    Maybe you better concentrate on quality rather than quantity of your posts?

    I don't know what your situation is. It is likely a different problem.

     

    You have too much attitude for a first-time user. You did not create this thread; you should have created a new thread and explained your situation. Don't complain if the answer to a question you did not provide does not answer your question that has not been asked here.

     lingen2 wrote:

    In this case doing a

    typedef _TCHAR *PTCHAR;

    before including the other headers works just fine.

    That is not a good solution.

    Tuesday, February 12, 2008 10:39 AM
  •  Simple Samples wrote:

    That is not a good solution.



    Of course not, but it works for me and most likely for the OP and others with similar problems. That's why I qualified it as a hack.

     Simple Samples wrote:
    You have too much attitude for a first-time user.


    You are living proof that the number of postings is not necessarily positively correlated to the quality of the answers given.


    Thursday, February 14, 2008 1:16 PM
  • I had the same problem! It was real nightmare. The problem was that i listed additional include directories in incorect order (I found out it compareing properties of my project and AmCAP sample). Just check order of additional include directories
    Thursday, September 4, 2008 7:27 AM
  • I just had a similar problem. It turns out I did a "#include <tchar.h>" in stdafx.h, which was throwing off the PTCHAR definition. Since the base classes are not going to change much, it probably makes sense to include them high up in your precompiled header.

    Other things that you should also check out (when you run out of options) are:

    • What is the Character Set that your project is compiling in? (MBCS vs. UNICODE).
    • Make sure that the "Treat wchar_t as Built-in type" should be the same as the option that was used to compile the baseclasses with. This is probably not an issue for most people.
    • Make sure the Platform SDK directory is fairly high up in Options->Projects and Solutions->VC++ Directories->Include Files. DirectShow can get very quirky when you don't have your include directories in the correct order.
    Hope this helps
    -Waldemar

    • Proposed as answer by laduran Saturday, October 27, 2012 8:58 PM
    Wednesday, May 5, 2010 3:40 PM
  • This was exactly the cause of my problem. I know this is old info but it helped me. Check that you are not including <tchar.h> in your stdafx.h file. This will then cause the compiler/preprocessor to pull in WinNT.h which has the correct definitions for PTCHAR.

    Thanks a Million Waldemar Sauer!!!!

    Wednesday, September 26, 2012 12:34 AM