Re: undeclared identifier by Justin
Justin
Fri Nov 21 11:36:41 CST 2003
The solution was found.
It appears that with pre-compiled headers, header includes must come after
StdAfx.h.
Thanks all,
Justin
"Justin" <Unk@unknown.com> wrote in message
news:#vMzikDsDHA.4092@tk2msftngp13.phx.gbl...
> William,
>
> Thanks for the response. I tried your suggestion. Still received the same
> errors.
>
> I created a blank console program and tried the code and it compiled with
> success. I created a new ATL project and tried the same code and it gives
> the compile errors of undeclared Identifier.
>
> I don't know if it something to do with the ATL configuration or what.
>
> The strange part is that if you hold the cursor above the definition, it
> lists the typedef. So, I know it is finding the header file and
definition.
>
> I do appreciate the time.
>
> Justin
>
>
> "William DePalo [MVP VC++]" <willd@mvps.org> wrote in message
> news:#QggC97rDHA.4056@TK2MSFTNGP11.phx.gbl...
> > "Justin" <Unk@unknown.com> wrote in message
> > news:#fCtxd6rDHA.640@tk2msftngp13.phx.gbl...
> > > My problem is that I am getting "Undeclared Identifiers" on function
> names
> > > and structures for NetWkstaUserGetInfo, NetApiBufferFree, and others
> > > although I have <windows.h> and <lm.h> included. I looked at <lm.h>
and
> it
> > > includes <lmwksta.h> which has the actual definitions in it.
> >
> > Chances are that the compiler doesn't realize that you target Windows
> > NT/2000/XP/2K+3
> >
> > Try adding this line
> >
> > #define _WIN32_WINNT 0x0400
> >
> > ahead of the place in your source where you included <windows.h> or a
> header
> > that includes it.
> >
> > Regards,
> > Will
> >
> >
> >
>
>