From f0b00d704b31165f7d6e8e8ccd1e9f40ba0fb283 Mon Sep 17 00:00:00 2001 From: cascade Date: Fri, 30 Jan 2009 17:53:34 +0000 Subject: [PATCH] OCC20825 Errors during compilation for new version of WOK --- src/WOKBuilder/WOKBuilder_DLLinker.cxx | 15 ++++++++----- src/WOKBuilder/WOKBuilder_EXELinker.cxx | 26 +++++++++++++++++----- src/WOKBuilder/WOKBuilder_MSTranslator.cxx | 20 +++++++++-------- 3 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/WOKBuilder/WOKBuilder_DLLinker.cxx b/src/WOKBuilder/WOKBuilder_DLLinker.cxx index 76330f3..0fc0ff2 100755 --- a/src/WOKBuilder/WOKBuilder_DLLinker.cxx +++ b/src/WOKBuilder/WOKBuilder_DLLinker.cxx @@ -67,15 +67,18 @@ Handle(TCollection_HAsciiString) WOKBuilder_DLLinker::EvalFooter() tmp = EvalToolTemplate ( "LinkerPDB" ); retVal -> AssignCat ( tmp ); outEnt[3] = new WOKBuilder_SharedLibrary(new WOKUtils_Path(tmp)); + +#if _MSC_VER >= 1400 outEnt[4] = new WOKBuilder_ManifestLibrary(new WOKUtils_Path(EvalToolTemplate("DLLMAN"))); - SetProduction(new WOKBuilder_HSequenceOfEntity()); +#endif - Produces()->Append(outEnt[0]); - Produces()->Append(outEnt[1]); - Produces()->Append(outEnt[2]); + SetProduction(new WOKBuilder_HSequenceOfEntity()); - Produces()->Append(outEnt[3]); - Produces()->Append(outEnt[4]); + for ( int i = 0; i < 5; i++ ) + { + if ( !outEnt[ i ].IsNull() ) + Produces()->Append( outEnt[ i ] ); + } return retVal; } diff --git a/src/WOKBuilder/WOKBuilder_EXELinker.cxx b/src/WOKBuilder/WOKBuilder_EXELinker.cxx index 774b989..3e63087 100755 --- a/src/WOKBuilder/WOKBuilder_EXELinker.cxx +++ b/src/WOKBuilder/WOKBuilder_EXELinker.cxx @@ -66,15 +66,31 @@ Handle(TCollection_HAsciiString) WOKBuilder_EXELinker::EvalFooter() retVal->AssignCat(tmp); outEnt[1] = new WOKBuilder_SharedLibrary(new WOKUtils_Path(tmp)); // } +#if _MSC_VER >= 1400 outEnt[2] = new WOKBuilder_ManifestLibrary(new WOKUtils_Path(EvalToolTemplate("EXEMAN"))); +#endif + SetProduction(new WOKBuilder_HSequenceOfEntity); - Produces()->Append(outEnt[0]); - - //if(fDebug) - Produces()->Append(outEnt[1]); - Produces()->Append(outEnt[2]); + + for ( int i = 0; i < 3; i++ ) + { + if ( !outEnt[ i ].IsNull() ) + Produces()->Append( outEnt[ i ] ); + } return retVal; } + + + + + + + + + + + + diff --git a/src/WOKBuilder/WOKBuilder_MSTranslator.cxx b/src/WOKBuilder/WOKBuilder_MSTranslator.cxx index ff59ed5..475929d 100755 --- a/src/WOKBuilder/WOKBuilder_MSTranslator.cxx +++ b/src/WOKBuilder/WOKBuilder_MSTranslator.cxx @@ -1594,17 +1594,19 @@ WOKBuilder_BuildStatus WOKBuilder_MSTranslator::BuildGenClass(const Handle(WOKBu // END JGA Handle(MS_GenClass) agenclass = Handle(MS_GenClass)::DownCast(ameta->GetType(anaction->Entity()->Name())); - Handle(MS_InstClass) instclass; - Handle(TColStd_HSequenceOfHAsciiString) nestedinst = agenclass->GetNestedInsClassesName(); - for(i=1; i<=nestedinst->Length(); i++) - { - Handle(TCollection_HAsciiString) fullname = MS::BuildFullName(agenclass->Package()->Name(), nestedinst->Value(i)); + if(!agenclass.IsNull()) { + Handle(MS_InstClass) instclass; + Handle(TColStd_HSequenceOfHAsciiString) nestedinst = agenclass->GetNestedInsClassesName(); + for(i=1; i<=nestedinst->Length(); i++) + { + Handle(TCollection_HAsciiString) fullname = MS::BuildFullName(agenclass->Package()->Name(), nestedinst->Value(i)); - instclass = Handle(MS_InstClass)::DownCast(MSchema()->MetaSchema()->GetType(fullname)); + instclass = Handle(MS_InstClass)::DownCast(MSchema()->MetaSchema()->GetType(fullname)); - if(! instclass.IsNull()) - AddAction(anit,instclass->GenClass(), WOKBuilder_GenType); - } + if(! instclass.IsNull()) + AddAction(anit,instclass->GenClass(), WOKBuilder_GenType); + } + } } break; default: -- 2.39.5