Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello
a have an error and i don't know how resolve it .the error is this line
if( ( m_pInputBuffer[i] = new WAVEHDR[ sizeof(WAVEHDR)] ) == NULL )
and the error message error C2065: 'DEBUG_NEW': undeclared identifier
any help ? thanks
Posted

If your developing an MFC application then you have to put:
C++
#include "stdafx.h"

at the top of your source file.
 
Share this answer
 
Comments
kinani 27-May-11 4:57am    
thanks but #include "stdafx.h" is at the top of the source file
In addition to your stated problem, this looks suspicious:
C++
new WAVEHDR[ sizeof(WAVEHDR)]


You probably mean one of
C++
(WAVEHDR*) new char[ sizeof(WAVEHDR)]

or
C++
new WAVEHDR[1]

or
C++
new WAVEHDR
 
Share this answer
 
v2
Comments
kinani 27-May-11 7:40am    
thanks the first y proposed is the true it work now thank you very much
DEBUG_NEW[^] is used to help find memory allocation problems.

The easiest way to fix this is to ensure that you include afx.h in your file.

Alternatively, you will have to search for the statement #define new DEBUG_NEW in your project and delete it (don't delete it from any system headers)
 
Share this answer
 
v2
Comments
kinani 27-May-11 5:15am    
thanks i have deleted #define new DEBUG_NEW and added #include <afx.h> but th error is fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d].
and if i don't add #include <afx.h> the error is impossible to open Dshow.lib
any idea again plz

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900