Question

I am trying to build the c++ file with WDK build environment and try to see the output in DebugView tool. So, When I tried the windows method OutputDebugString(L"Inside the method"); in our program and when I compiled the c++ file, got the following error.

error C3861: 'OutputDebugString': identifier not found

After that I have include the header file "Windows.h", then I got the following error:

error C2182: 'WakeAllConditionVariable' : illegal use of type 'void' error C2491: 'WakeAllConditionVariable' : definition of dllimport data not allowed error C2440: 'initializing' : cannot convert from 'int *' to 'int' error C2059: syntax error : ')' error C2146: syntax error : missing ')' before identifier 'ConditionVariable' error C2491: 'SleepConditionVariableCS' : definition of dllimport data not allowed

approx 243 error.

Please suggest me the solution. Thanks,

Was it helpful?

Solution 2

I have resolved the issue using routine DbgPrint instead of method OutputDebugString. Syntax:

DbgPrint("Test");

OTHER TIPS

If you include the WDK include file "winbase.h" instead of "windows.h", it should resolve your problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top