Newbie C++ (VS2010) Compiler Warning Question

Unanswered Newbie C++ (VS2010) Compiler Warning Question

  • Saturday, 14 April 2012 12:40 PM
     
     

    Hi,

    I have just had my first go at playing around with Infer.net and although the test app (the mixture of gaussians demo on the site) is successfully building, I am getting a huge number of warnings. I presume I have got a compiler setting wrong or something similar. 

    1>MoG Test.cpp(19): warning C4691: 'System::Func' : type referenced was expected in unreferenced assembly 'System.Core', type defined in current translation unit used instead
    1>          This diagnostic occurred while importing type 'MicrosoftResearch::Infer::Maths::Vector ' from assembly 'Infer.Runtime, Version=2.4.11012.0, Culture=neutral, PublicKeyToken=e4813102a62778da'.
    1>MoG Test.cpp(19): warning C4691: 'System::Func' : type referenced was expected in unreferenced assembly 'System.Core', type defined in current translation unit used instead
    1>          This diagnostic occurred while importing type 'MicrosoftResearch::Infer::Maths::Vector ' from assembly 'Infer.Runtime, Version=2.4.11012.0, Culture=neutral, PublicKeyToken=e4813102a62778da'.
    1>MoG Test.cpp(19): warning C4691: 'System::Func' : type referenced was expected in unreferenced assembly 'System.Core', type defined in current translation unit used instead
    1>          This diagnostic occurred while importing type 'MicrosoftResearch::Infer::Maths::Vector ' from assembly 'Infer.Runtime, Version=2.4.11012.0, Culture=neutral, PublicKeyToken=e4813102a62778da'.
    1>MoG Test.cpp(19): warning C4691: 'System::Func' : type referenced was expected in unreferenced assembly 'System.Core', type defined in current translation unit used instead
    1>          This diagnostic occurred while importing type 'MicrosoftResearch::Infer::Maths::Vector ' from assembly 'Infer.Runtime, Version=2.4.11012.0, Culture=neutral, PublicKeyToken=e4813102a62778da'.
    1>MoG Test.cpp(69): warning C4691: 'System::Func' : type referenced was expected in unreferenced assembly 'System.Core', type defined in current translation unit used instead
    1>          This diagnostic occurred while importing type 'MicrosoftResearch::Infer::Distributions::Distribution ' from assembly 'Infer.Runtime, Version=2.4.11012.0, Culture=neutral, PublicKeyToken=e4813102a62778da'.
    1>MoG Test.cpp(69): warning C4691: 'System::Func' : type referenced was expected in unreferenced assembly 'System.Core', type defined in current translation unit used instead
    1>          This diagnostic occurred while importing type 'MicrosoftResearch::Infer::Distributions::Distribution ' from assembly 'Infer.Runtime, Version=2.4.11012.0, Culture=neutral, PublicKeyToken=e4813102a62778da'.
    1>MoG Test.cpp(84): warning C4691: 'System::Func' : type referenced was expected in unreferenced assembly 'System.Core', type defined in current translation unit used instead
    1>          This diagnostic occurred while importing type 'MicrosoftResearch::Infer::InferenceEngine ' from assembly 'Infer.Compiler, Version=2.4.11012.0, Culture=neutral, PublicKeyToken=e4813102a62778da'.


    Any help would be much appreciated.

All Replies

  • Tuesday, 17 April 2012 3:56 PM
     
     
    This indicates a framework version mismatch between the project and the libraries being referenced.  The Infer.NET dlls were built under framework 3.5.  Try changing the framework version for the project.