Error ----

Error ----

Hi, Can anyone help in fixing this error.... ------ Build started: Project: CAnalyzer, Configuration: Debug Win32 ------ Compiling... StdAfx.cpp C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(308) : warning C4996: '_vsnprintf': This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(358) : see declaration of '_vsnprintf' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(324) : warning C4996: '_vsnprintf': This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(358) : see declaration of '_vsnprintf' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(341) : warning C4996: '_vsnwprintf': This function or variable may be unsafe. Consider using _vsnwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(483) : see declaration of '_vsnwprintf' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(357) : warning C4996: '_vsnwprintf': This function or variable may be unsafe. Consider using _vsnwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(483) : see declaration of '_vsnwprintf' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(772) : error C2065: 'T' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(819) : error C2061: syntax error : identifier 'T' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(775) : error C2065: 'T' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(821) : error C2065: 'ppT' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(822) : error C2065: 'ppT' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(824) : error C2065: 'ppT' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(840) : error C2065: 'T' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(848) : error C2065: 'T' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2282) : warning C4346: 'ATL::CComObjectRootEx::ATL::CComObjectRootEx::_ThreadModel::AutoCriticalSection' : dependent name is not a type prefix with 'typename' to indicate a type C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2300) : see reference to class template instantiation 'ATL::CComObjectRootEx' being compiled C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2282) : error C2146: syntax error : missing ';' before identifier '_CritSec' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2282) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2299) : error C2146: syntax error : missing ';' before identifier 'm_critsec' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2299) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2299) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2632) : warning C4346: 'contained::_ThreadModel::ThreadModelNoCS' : dependent name is not a type prefix with 'typename' to indicate a type C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2716) : see reference to class template instantiation 'ATL::CComAggObject' being compiled C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2632) : error C2923: 'ATL::CComObjectRootEx' : 'contained::_ThreadModel::ThreadModelNoCS' is not a valid template type argument for parameter 'ThreadModel' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2633) : error C2955: 'ATL::CComObjectRootEx' : use of class template requires template argument list C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2278) : see declaration of 'ATL::CComObjectRootEx' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2724) : warning C4346: 'contained::_ThreadModel::ThreadModelNoCS' : dependent name is not a type prefix with 'typename' to indicate a type C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2811) : see reference to class template instantiation 'ATL::CComPolyObject' being compiled C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2724) : error C2923: 'ATL::CComObjectRootEx' : 'contained::_ThreadModel::ThreadModelNoCS' is not a valid template type argument for parameter 'ThreadModel' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2725) : error C2955: 'ATL::CComObjectRootEx' : use of class template requires template argument list C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2278) : see declaration of 'ATL::CComObjectRootEx' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2851) : warning C4346: 'contained::_ThreadModel::ThreadModelNoCS' : dependent name is not a type prefix with 'typename' to indicate a type C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2910) : see reference to class template instantiation 'ATL::CComCachedTearOffObject' being compiled C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2851) : error C2923: 'ATL::CComObjectRootEx' : 'contained::_ThreadModel::ThreadModelNoCS' is not a valid template type argument for parameter 'ThreadModel' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2852) : error C2955: 'ATL::CComObjectRootEx' : use of class template requires template argument list C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(2278) : see declaration of 'ATL::CComObjectRootEx' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(3259) : error C2065: 'j' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(3313) : error C2668: 'ATL::InlineIsEqualGUID' : ambiguous call to overloaded function C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlbase.h(913): could be 'BOOL ATL::InlineIsEqualGUID(const GUID &,const GUID &)' C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\guiddef.h(150): or 'int InlineIsEqualGUID(const GUID &,const GUID &)' [found using argument-dependent lookup] while trying to match the argument list '(const GUID, const IID)' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(3980) : warning C4346: 'ATL::IDispEventImpl::_tihclass' : dependent name is not a type prefix with 'typename' to indicate a type C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(3980) : error C2143: syntax error : missing ';' before 'ATL::IDispEventImpl::_tih' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(3980) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(3980) : error C2888: 'IDispEventImpl::_tihclass _tihclass' : symbol cannot be defined within namespace 'ATL' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\atlcom.h(3980) : fatal error C1903: unable to recover from previous error(s); stopping compilation Creating browse information file... Microsoft Browse Information Maintenance Utility Version 9.00.21022 Copyright (C) Microsoft Corporation. All rights reserved. BSCMAKE: error BK1506 : cannot open file '.\Debug\StdAfx.sbr': No such file or directory Build log was saved at "file://e:\Copy of CAnalyzer with all reports(130309)\Debug\BuildLog.htm" CAnalyzer - 26 error(s), 9 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Regards, Praveen
11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Praveen,

Please post your linker and compiler settings. Also post your stdafx.h includes. This will help us assist you with your errors.

c/c++
Command Line : All Options:-

/D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "_X86" /D

"_VC80_UPGRADE=0x0600" /D "_ATL_DLL" /FD /EHsc /MDd /GS- /Yu"stdafx.h"

/Fp".\Debug/CAnalyzer.pch" /Fo".\Debug/" /Fd".\Debug/" /FR".\Debug\\" /W3 /nologo /c

/Zi /Gd /TP /errorReport:prompt

Linker

Command Line : All Options:-

/OUT:".\Debug/CAnalyzer.exe" /NOLOGO /MANIFEST

/MANIFESTFILE:".\Debug\CAnalyzer.exe.intermediate.manifest"

/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /ASSEMBLYDEBUG

/PDB:".\Debug/CAnalyzer.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /MACHINE:X86

/ERRORREPORT:PROMPT

#include // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#define _ATL_APARTMENT_THREADED

#include
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
class CCAnalyzerModule : public CComModule
{
public:
LONG Unlock();
LONG Lock();
DWORD dwThreadID;
};
extern CCAnalyzerModule _Module;
#include

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__F5686DCB_A0CC_11D2_9547_CEB8E849F461__INCLUDED_)

1.) To remove all of those deprecation messages you can add this to a common header file:

#pragma warning(disable : 4996)

2.) I see alot of the errors are failures with reference to ATL. Are you using ATL in your project? If so, ensure you have set the compiler to reference the ATL library.

I see the VS9 references n the error log, are you using Visual Studio 2008 to compile, or some other method?

Is your ATL headers was installed with VS2009 or you just copy it to "VC\include" from another location?

yes, we are using VS 2008 compiler. And we also set the compiler to reference the ATL library - static link to ATL

we did not copied ATL headers from any other location, they were installed with VS 2008 only.

http://rapidshare.com/files/327337904/settingsvs2008.doc.html

This Word Document gives the full compiler settings.

Hi Can any one plz Help themto resolve this Issue?

Praveen,

Please see my questions in this response: http://appdeveloper.intel.com/en-us/node/850#comment-1247

Answering those will help me and others to assist you.

Hi,

On my behalf Mr.Pedar has replied to your query and shared a link to a doc file to know more info

Leave a Comment

Please sign in to add a comment. Not a member? Join today