Hi everyone,
I have a quick question. I am new to Visual Studio 2015 and want to use Infer.NET with C++. Hence I tried to run the TwoCoins example in a C++ CLR console application but I get a C1001 error.
In order to keep this post short I've shortened the original TwoCoins example to the error relevant lines:
#include "stdafx.h"
using namespace System;
using namespace MicrosoftResearch::Infer::Models;
void TwoCoins()
{
// The model
Variable<bool>^ firstCoin = Variable::Bernoulli(0.5)->Named("firstCoin");
}
int main()
{
TwoCoins();
return 0;
}
The corresponding error message:
Severity Code
Description
Project File
Line
Error C1001
An internal error has occurred in the compiler.
ConsoleApplication5
C:\Users\Eric\Documents\Visual Studio 2015\Projects\ConsoleApplication5\ConsoleApplication5\ConsoleApplication5.cpp
8
I added the Runtime.Infer.dll and Compiler.Infer.dll as recommended on the Infer.NET website as well as setting the .NET framework to 4.6. Following the link of the error message ( https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k%28C1001%29;k%28TargetFrameworkMoniker-.NETFramework
) I tried the different optimizers, without success. Commenting bits out in the error related line it seems that Variable::Bernoulli causes the error. I tried to find similar errors googling around without success.
This is probably a VS Newbie problem but any tips would be greatly appreciated!
Thank you in advance!
Eric