2016-06-07 5 views
0

Scilab/Xcos를 처음 접해서 처음으로 설정하려고합니다. Xcos 블록 중 일부는 C 컴파일러가 필요하다는 것을 알았습니다.Scilab with Visual Studio 2015

이미 Visual Studio 2015 Professional이 설치되어 있고 Scilab에서 findmsvccompiler을 실행하면 msvc100pro을 반환합니다. configure_msvc을 실행하면 T (true?)을 반환합니다.

그러나 haveacompiler을 실행하면 F (false?)이됩니다.

Scilab에서 VS2015의 컴파일러를 사용할 방법이 있습니까? supported compilers 페이지는 최대 VS2013까지만 나열되지만 VS2015가 출시되기 전에 해당 페이지가 마지막으로 업데이트 된 것처럼 보입니다.

수동으로 Scilab을 설정하여 VC++ 2015 컴파일러를 사용할 수 있습니까? 아니면 MinGW 컴파일러를 설치해야합니까?

답변

1

최근 scicos 6.0.0 및 VC 2015 Express에 대한 해결 방법을 발견했습니다. 문제는 잘못된 키를 탐지하는 것 같습니다 (dlwIsVc14Express.sci 참조). 하지만이 키를 만드는 것만으로는 충분하지 않습니다.

내가 선택한 방법은 scilab 6.0.0 콘솔에이 줄을 붙여 넣기 복사하는 것입니다. 샘플의 xcos 컴파일은 나를 위해 잘 작동합니다.

// Scilab (http://www.scilab.org/) - This file is part of Scilab 
// Copyright (C) DIGITEO - 2010 - Allan CORNET 
// Copyright (C) Scilab Enterprises - 2014 - Antoine ELIAS 
// 
// Copyright (C) 2012 - 2016 - Scilab Enterprises 
// 
// This file is hereby licensed under the terms of the GNU GPL v2.0, 
// pursuant to article 5.3.4 of the CeCILL v.2.1. 
// This file was originally licensed under the terms of the CeCILL v2.1, 
// and continues to be available under such terms. 
// For more information, see the COPYING file which you should have received 
// along with this program. 


// copy paste this modified function in scilab 6.0.0 console , then xcos compile 

//============================================================================= 
function bOK = dlwIsVc14Express() 
    bOK = %f; 
    try 
     if winqueryreg("key", "HKLM", "Software\Microsoft\DevDiv\vc\Servicing\14.0") <> [] then 
      bOK = %t; 
     end 
    catch 
    end 
endfunction 
//============================================================================= 

//============================================================================= 
// NDLA : I don't know the righ key to chose for dlwIsVc14Pro : change default function here 

/* 

function bOK = dlwIsVc14Pro() 
    bOK = %f; 
    try 
     if winqueryreg("HKLM", "Software\Microsoft\DevDiv\vs\Servicing\14.0\devenv", "install") == 1 & ... 
      dlwIsVc14Express() == %f then 
      bOK = %t; 
     end 
    catch 
    end 
endfunction 

*/ 

//============================================================================= 


//============================================================================= 
function MSCompiler = dlwFindMsVcCompiler() 
    MSCompiler = "unknown"; // unknown 

    // We use always last version of MS compiler 

    val = getenv("SCILAB_PREFERED_MSVC", ""); 
    if val <> "" then 
     funcs = list(dlwIsVc14Express,dlwIsVc14Pro,dlwIsVc14Express,dlwIsVc12Pro,dlwIsVc11Express,dlwIsVc11Pro,dlwIsVc10Express,dlwIsVc10Pro); 
     compilers = [ ... 
     "msvc140express"; 
     "msvc140pro"; 
     "msvc120express"; 
     "msvc120pro"; 
     "msvc110express"; 
     "msvc110pro"; 
     "msvc100express"; 
     "msvc100pro";]; 
     idx = find(val == compilers); 
     if idx <> [] then 
      func = funcs(idx); 
      if func() then 
       MSCompiler = val; 
       return; 
      end 
     end 
    end 


    if dlwIsVc14Express() then 
     MSCompiler = "msvc140express";  // Microsoft Visual 2015 Express 
     return; 
    end 

    if dlwIsVc14Pro() then 
     MSCompiler = "msvc140pro";  // Microsoft Visual 2015 Professional/Community (or more) 
     return; 
    end 

endfunction 
//=============================================================================