Link to home
Start Free TrialLog in
Avatar of tao_shaobin
tao_shaobin

asked on

debugging CGI program

I have a C++ program that will be put in the directory cgi-bin.  How can I debug the program in VC++?  Thanks

ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tao_shaobin
tao_shaobin

ASKER

Hi, Chensu:

I tried the function DebugBreak() and its header file

#include <winbase.h>

Then, the compiler give me some errors as below:

d:\vc98\include\winbase.h(216) : error C2146: syntax error : missing ';' before identifier 'Internal'
d:\vc98\include\winbase.h(216) : error C2501: 'DWORD' : missing storage-class or type specifiers
d:\vc98\include\winbase.h(216) : error C2501: 'Internal' : missing storage-class or type specifiers

why?
#include <windows.h>

instead of

#include <winbase.h>
Hi, Why should I use <windows.h> instead of <winbase.h> since my online help give me:

QuickInfo
  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winbase.h.
  Import Library: Use kernel32.lib.

Yes, DebugBreak is declared in the winbase.h. However, winbase.h requires other header files to be included first. Windows.h does this and it includes winbase.h. You should include windows.h for most basic Win32 API functions.
The documentation is somewhat confusing though.