I am moving Win32 console app that works fine, as built by VS2003, to VS2005.
This app automates Excel and in 2003 used Project/Add Class to create header
files that included all methods and did not include an #import directive.
In 2005, Add Class creates smaller header files with #import directives.
The resulting tlh file is huge and generates a huge number of errors. C4430
is predominant.
What am I doing wrong?
Thanks,
Bill Below
Hello Bill,
Greetings,
What is Compiler Warning C4430
==============================
Compiler Warning C4430
Error Message
missing type specifier - int assumed. Note: C++ does not support default-int
This error can be generated as a result of compiler conformance work that
was done for Visual C++ 2005: all declarations must now explicitly specify
the type; int is no longer assumed. See Breaking Changes in the Visual C++
2005 Compiler for more information.
C4430 is always issued as an error. You can turn off this warning with the
#pragma warning or /wd; see warning or /w, /Wn, /WX, /Wall, /wln, /wdn, /wen,
/won (Warning Level) for more information.
Example that generaes C4430
==============================
The following sample generates C4430
========================================
// C4430.cpp
// compile with: /c
struct CMyClass {
CUndeclared m_myClass; // C4430
int m_myClass; // OK
};
typedef struct {
POINT(); // C4430
// try the following line instead
// int POINT();
unsigned x;
unsigned y;
} POINT;
Breaking Changes in VS 2005:
==============================
Compiler will not inject int as the default type in declarations
Code that is missing the type in a declaration will no longer default to
type int the compiler will generate Compiler Warning C4430 or Compiler
Warning (level 4) C4431. Standard C++ does not support a default int and this
change will ensure that you get the type you really want.
Links that talks:
=================
http://msdn.microsoft.com/visualc/default.aspx?pull=/library/en-us/dnvs05/html/T
ransGuide.asp
http://msdn2.microsoft.com/en-us/library/11321bfc-2def-4d4d-89f9-db8d5635e797.aspx
http://msdn2.microsoft.com/en-us/library/ms177253.aspx
HTH,
Ram

Signature
Ramanathan Kathiresan
VC++ | C# | J# | Developer Support Team
Microsoft R&D Corporation
http://blogs.technet.com/rams/default.aspx
http://blogs.msdn.com/ramanathan%5Fkathiresan/
> I am moving Win32 console app that works fine, as built by VS2003, to VS2005.
> This app automates Excel and in 2003 used Project/Add Class to create header
[quoted text clipped - 8 lines]
> Thanks,
> Bill Below
Bill Below - 25 Sep 2006 21:58 GMT
Ram,
I gave C4430 as an example. My real problem is that it is produced by code
in excel9.tlh which is produced by the IDE at compile time so there is no
point in "fixing" it.
Ideally, I would like to find some way to get the Add Class from Typelib
Wizard in VS2005 to act like VS2003 and produce CApplication.h, CRange.h etc
containing complete wrappers and no #import directives and eliminate the
75,000 line tlh and tli files.
Failing that, I would like to find some way to make VS2005 produce a tlh
file that will compile.
Thanks,
Bill
> Hello Bill,
>
[quoted text clipped - 66 lines]
> > Thanks,
> > Bill Below