2016-09-18 5 views
0

を使用してエラーをコンパイルします。Encog-cは、私が<a href="http://www.heatonresearch.com/encog/" rel="nofollow">http://www.heatonresearch.com/encog/</a>からencog-C源泉をダウンロードし、vs2015のコミュニティを使用して指示通りにそれらをコンパイルしようとしてきたvs2015コミュニティ

私はソリューションを構築するとき、私は次のエラーを取得:

Severity Code Description Project File Line Suppression State 

    Error C2059 syntax error: 'sizeof' encog-core C:\Users\ypx7647\Documents\Visual Studio 2015\Projects\encog-c-master\encog-core\util.c 39 

    Error C2059 syntax error: 'sizeof' encog-core C:\Users\ypx7647\Documents\Visual Studio 2015\Projects\encog-c-master\encog-core\util.c 44 

このリンカ問題:

Severity Code Description Project File Line Suppression State 

    Error LNK1181 cannot open input file 'C:\Users\ypx7647\Documents\Visual  Studio 2015\Projects\encog-c-master\Release\encog-core.lib' encog-cmd C:\Users\ypx7647\Documents\Visual Studio 2015\Projects\encog-c-master\encog-cmd\LINK 1 

私はコード(ここではコードがあります)で、エラーをsunderstandません。

#ifdef _MSC_VER 
int isnan(double x) 
{ 
    return x != x; 
} 

int isinf(double x) 
{ 
    return !isnan(x) && isnan(x - x);  
} 
#endif 

リンカーエラーのため、encog-c-core.libファイルが見つかりません。 lリンカーディレクトリ。

私は間違っていますか?ソースをコンパイルするために、環境の中で何を設定する必要がありますか?

ご協力いただきありがとうございます。 https://msdn.microsoft.com/en-us/library/tzthab44.aspx

  • ISNAN

  • +0

    実際、私は間違っています。 https://github.com/encogからhttp://www.heatonresearch.com/encog/からソースをダウンロードしました。 – Andrew

    答えて

    1

    MSDNのドキュメントによると

    ISINFのVisual Studio 2015以降、両方の機能は、ライブラリで定義されています。したがって、util.cの回避策は必要ありません。これらの定義を削除またはコメントアウトするには、util.c

    /* 
    #ifdef _MSC_VER 
    int isnan(double x) 
    { 
        return x != x; 
    } 
    
    int isinf(double x) 
    { 
        return !isnan(x) && isnan(x - x);  
    } 
    #endif 
    */ 
    

    で再コンパイルしてください。この助けを願っています。

    関連する問題

     関連する問題