Resources for IT Professionals > Página Inicial dos Fóruns > Windows HPC Server Developers - General > Error: C4772 and Error:C2664 with HPC API sample code ...
Fazer uma PerguntaFazer uma Pergunta
 

RespondidoError: C4772 and Error:C2664 with HPC API sample code ...

  • sexta-feira, 15 de maio de 2009 7:24Seifer Lin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hi all:

    I am studying the HPC API (c++), therefore I install HPC Pack 2008 SDK (x86).

    I copy the sample code from http://msdn.microsoft.com/en-us/library/cc853436(VS.85).aspx

    I use VS2005 to compile the code, and got the following errors

    1>------ Rebuild All started: Project: GetNodeInCluster, Configuration: Release Win32 ------
    1>Deleting intermediate and output files for project 'GetNodeInCluster', configuration 'Release|Win32'
    1>Compiling...
    1>main.cpp
    1>.\main.cpp(11) : error C4772: #import referenced a type from a missing type library; '__missing_type__' used as a placeholder
    1>.\main.cpp(189) : error C2664: 'ISchedulerNode::get_JobType' : cannot convert parameter 1 from 'JobType *__w64 ' to '__missing_type__ *'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>.\main.cpp(283) : error C2664: 'ISchedulerNode::get_State' : cannot convert parameter 1 from 'NodeState *__w64 ' to '__missing_type__ *'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>.\main.cpp(379) : error C2664: 'ISchedulerCore::get_TaskId' : cannot convert parameter 1 from 'ITaskId **__w64 ' to '__missing_type__ **'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>Build log was saved at "file://d:\HPC_practice\GetNodeInCluster\Release\BuildLog.htm"
    1>GetNodeInCluster - 4 error(s), 0 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    I have added the include dir: C:\Program Files\Microsoft HPC Pack 2008 SDK\Lib\i386 where the Microsoft.Hpc.Scheduler.tlb and Microsoft.Hpc.Scheduler.Properties.tlb are located.

    My OS is Windows XP Professional 32bit


    thank you.

    regards,

    Seifer

Respostas

Todas as Respostas

  • sexta-feira, 15 de maio de 2009 23:47Josh BarnardMSFT, ProprietárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Resposta Proposta
    Hey Seifer,
    I believe this is a known issue with the SDK that should be fixed when we release our first Service Pack (coming soon!).  In the meantime, our COM API developer says it should actually work if you just compile it a second time (a strange workaround, I know).

    Please let us know if that helps or not!

    Thanks,
    Josh
    -Josh
  • sábado, 16 de maio de 2009 7:45Seifer Lin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hi Josh:

    If I compile again ...

    only
    >.\main.cpp(11) : error C4772: #import referenced a type from a missing type library; '__missing_type__' used as a placeholder
    is disappeared.


    I still got the error

    1>.\main.cpp(189) : error C2664: 'ISchedulerNode::get_JobType' : cannot convert parameter 1 from 'JobType *__w64 ' to '__missing_type__ *'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>.\main.cpp(283) : error C2664: 'ISchedulerNode::get_State' : cannot convert parameter 1 from 'NodeState *__w64 ' to '__missing_type__ *'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>.\main.cpp(379) : error C2664: 'ISchedulerCore::get_TaskId' : cannot convert parameter 1 from 'ITaskId **__w64 ' to '__missing_type__ **'
    1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


    thank you.

    regards,

    Seifer
  • terça-feira, 7 de julho de 2009 2:22Seifer Lin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hi:

    After 2 months, is there any solution available ?

    thank you!

    regards,

    Seifer
  • sexta-feira, 17 de julho de 2009 17:59Josh BarnardMSFT, ProprietárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Resposta Proposta
    Seifer,
    We've released SP1 now.  Have you tried upgrading?  I've linked below to the Service Pack (install on your client and cluster nodes) and to the refreshed SDK.  These should include fixes to the problems you saw; please post again if you still have a problem.  Starting a new thread might be a good idea to make sure we see it :-)

    HPC SDK SP1- http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3fe15731-b1b6-42de-b278-5ccd46c0863b
    HPC Pack SP1- http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a78520f1-de82-4442-b273-2ff7327b9140

    Thanks!
    Josh
    -Josh
  • sábado, 18 de julho de 2009 4:26Seifer Lin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido
    Hi Josh, thank you very much.

    The sample code now works well !

    regards,

    Seifer
    • Marcado como RespostaSeifer Lin sábado, 18 de julho de 2009 4:26
    •