By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,677 Members | 1,877 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,677 IT Pros & Developers. It's quick & easy.

atlconv.h header error..

P: n/a
When I try to compile my VC++ program (am Using VS6.0). I get the
following error in a header file ATLCONV.H.

c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(52)
: error C2065: '_ASSERTE' : undeclared identifier
Error executing cl.exe.

and it points to

inline LPWSTR WINAPI AtlA2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars,
UINT acp)
{
ATLASSERT(lpa != NULL); //points to this line. Error is here
ATLASSERT(lpw != NULL);

//rest of the header code
}

This is the only error I have. I tried to include assert.h but the
error multiplies... so I had revert back. Since it is showing an error
on the header file, is it BUG in the compiler or something? or am I
seeing things differently?

My Main program has the following include statements

#include "asapdefs.h"

#include "atlconv.h"

#include "stdafx.h"

#include <string>

//#undef new
#import "..\..\SomeTLBfile.tlb" raw_interfaces_only

//someother code

Any inputs or thoughts????

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Karthik wrote:
When I try to compile my VC++ program (am Using VS6.0). I get the
following error in a header file ATLCONV.H.

c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(52)
: error C2065: '_ASSERTE' : undeclared identifier
Error executing cl.exe.

and it points to

inline LPWSTR WINAPI AtlA2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars,
UINT acp)
{
ATLASSERT(lpa != NULL); //points to this line. Error is here
ATLASSERT(lpw != NULL);

//rest of the header code
}

This is the only error I have. I tried to include assert.h but the
error multiplies... so I had revert back. Since it is showing an error
on the header file, is it BUG in the compiler or something? or am I
seeing things differently? [some snips] Any inputs or thoughts????


Ok, if my stumbling here does not help, you should check
one of the microsoft or windows news groups. Say the ones
under microsoft.public.vc.* at google. This would not be
a bad idea regardless of whether my stumblings help or
not. Anyway...

Either you have not included the appropriate window-ish
header files (and you'll have to check what an ATL project
wants) or you have not set the right compiler flags or
options (again, you'll have to check what an ATL project
wants).

Big fat hairy guess comming. ATLASSERT is looking for
the header or library that defines ASSERTE, which I
can only presume is the local language equiv of ASSERT.
It's checking to see that you have not passed a null
pointer in to this function. But you have not connected
up to the correct support files for an ATL project to
know what to do with a call to ASSERTE.

Try snooping around in your online help files to see if
it tells you what library and header files you need to
include for ATL projects and for window-ish versions of
the ASSERT macro.
Socks

Jul 23 '05 #2

P: n/a
I added altbase.h.. in the include stmnt solved my error!!! :-)

gr8 thnx a much!!!

Karthik

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.