Compile errors in ATL/WTL application
-
In my ATL application I get a huge number of errors when trying to compile it. This is my stdafx.h: #pragma once #ifndef STRICT #define STRICT #endif #define WIN32_LEAN_AND_MEAN #define WINVER 0x0500 #define _WIN32_WINNT 0x0500 #define _WIN32_IE 0x0501 #define _RICHEDIT_VER 0x0100 #define _ATL_ALL_WARNINGS #include <atlbase.h> #include <atlapp.h> extern CAppModule _Module; #include <atlwin.h> #include <atlstr.h> #include <atlcontrols.h> #include "../FileEnc/resource.h" using namespace ATL; Any ideas? I tried changing the WTL 8.0 to WTL 7.1, but it is the same. I also updated the header files and moved the include WTL to the bottom of the list in the include options dialog, but to no avail. This is the error list I get: Error 2 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7269 Error 3 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7282 Error 4 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7298 Error 5 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7305 Error 6 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7324 Error 7 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7425 Error 8 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7432 Error 9 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7439 Error 10 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7446 Error 11 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7459 Error 12 error C2146: syntax error : missing ';' before identifier 'GetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7490 Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7490 Error 14 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7491 Error 16 error C2146: syntax error : missing ';' before identifier 'SetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7496 Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7496 Error 18 error C2061: syntax error : identifier 'EDITWORDBREAKPROCEX' e:\wtl80\include\atlctrls.h 7496 Error 19 error C4430: missing t
-
In my ATL application I get a huge number of errors when trying to compile it. This is my stdafx.h: #pragma once #ifndef STRICT #define STRICT #endif #define WIN32_LEAN_AND_MEAN #define WINVER 0x0500 #define _WIN32_WINNT 0x0500 #define _WIN32_IE 0x0501 #define _RICHEDIT_VER 0x0100 #define _ATL_ALL_WARNINGS #include <atlbase.h> #include <atlapp.h> extern CAppModule _Module; #include <atlwin.h> #include <atlstr.h> #include <atlcontrols.h> #include "../FileEnc/resource.h" using namespace ATL; Any ideas? I tried changing the WTL 8.0 to WTL 7.1, but it is the same. I also updated the header files and moved the include WTL to the bottom of the list in the include options dialog, but to no avail. This is the error list I get: Error 2 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7269 Error 3 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7282 Error 4 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7298 Error 5 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7305 Error 6 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7324 Error 7 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7425 Error 8 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7432 Error 9 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7439 Error 10 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7446 Error 11 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7459 Error 12 error C2146: syntax error : missing ';' before identifier 'GetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7490 Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7490 Error 14 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7491 Error 16 error C2146: syntax error : missing ';' before identifier 'SetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7496 Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7496 Error 18 error C2061: syntax error : identifier 'EDITWORDBREAKPROCEX' e:\wtl80\include\atlctrls.h 7496 Error 19 error C4430: missing t
I doubt, if its due to incorrect include sequnce. Try including
Richedit.h
before any wtl header.Prasad Notifier using ATL | Operator new[],delete[][^]
-
I doubt, if its due to incorrect include sequnce. Try including
Richedit.h
before any wtl header.Prasad Notifier using ATL | Operator new[],delete[][^]
-
In my ATL application I get a huge number of errors when trying to compile it. This is my stdafx.h: #pragma once #ifndef STRICT #define STRICT #endif #define WIN32_LEAN_AND_MEAN #define WINVER 0x0500 #define _WIN32_WINNT 0x0500 #define _WIN32_IE 0x0501 #define _RICHEDIT_VER 0x0100 #define _ATL_ALL_WARNINGS #include <atlbase.h> #include <atlapp.h> extern CAppModule _Module; #include <atlwin.h> #include <atlstr.h> #include <atlcontrols.h> #include "../FileEnc/resource.h" using namespace ATL; Any ideas? I tried changing the WTL 8.0 to WTL 7.1, but it is the same. I also updated the header files and moved the include WTL to the bottom of the list in the include options dialog, but to no avail. This is the error list I get: Error 2 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7269 Error 3 error C2061: syntax error : identifier 'CHARRANGE' e:\wtl80\include\atlctrls.h 7282 Error 4 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7298 Error 5 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7305 Error 6 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7324 Error 7 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7425 Error 8 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7432 Error 9 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7439 Error 10 error C2061: syntax error : identifier 'CHARFORMATA' e:\wtl80\include\atlctrls.h 7446 Error 11 error C2061: syntax error : identifier 'PARAFORMAT' e:\wtl80\include\atlctrls.h 7459 Error 12 error C2146: syntax error : missing ';' before identifier 'GetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7490 Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7490 Error 14 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7491 Error 16 error C2146: syntax error : missing ';' before identifier 'SetWordBreakProcEx' e:\wtl80\include\atlctrls.h 7496 Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\wtl80\include\atlctrls.h 7496 Error 18 error C2061: syntax error : identifier 'EDITWORDBREAKPROCEX' e:\wtl80\include\atlctrls.h 7496 Error 19 error C4430: missing t
Hi, Most of your problem seems to come from the confusing WTL CString support. Try this: // stdafx.h // your global #define ... #include #include #define _WTL_NO_CSTRING #include extern CAppModule _Module; #include // your other 'namespace ATL{' #include ... // your 'namespace WTL{' #include ... // your other aplication #include ... cheers, AR