Scilab 2023 Xcos electrical demo does not work in Windows 10

515 Views Asked by At

I've just installed Scilab 2023 in Windows 10 with Visual Studio Buildtools successfully:

--> haveacompiler()
 ans  =

  T

--> findmsvccompiler()
 ans  =

  "Visual Studio Build Tools 2022"

But when I try simulating Electrical Demo in Xcos, RLC, for example, this is the answer "

fatal error C1083: 'math.h': No such file or directory"
  "El sistema no puede encontrar el archivo especificado."                                                  
  " del *.bak"                                                                                              
  "No se pudo encontrar C:\Users\896905~1.VIA\AppData\Local\Temp\SCI_TMP_17336_25925\*.bak"                 
  " del "Release\*.obj""                                                                                    
  "No se pudo encontrar C:\Users\896905~1.VIA\AppData\Local\Temp\SCI_TMP_17336_25925\Release\*.obj"         
  " rmdir "Release""                                                                                        
  " del "Release\*.obj""                                                                                    
  "El sistema no puede encontrar el archivo especificado."                                                  
  " del libRLC_Modelica_im_gateway.c"                                                                       
  "No se pudo encontrar C:\Users\896905~1.VIA\AppData\Local\Temp\SCI_TMP_17336_25925\libRLC_Modelica_im_gateway.c"
  " del libRLC_Modelica_im.def"                                                                             
  "No se pudo encontrar C:\Users\896905~1.VIA\AppData\Local\Temp\SCI_TMP_17336_25925\libRLC_Modelica_im.def"
  " del libRLC_Modelica_im.dll"                                                                             
  "No se pudo encontrar C:\Users\896905~1.VIA\AppData\Local\Temp\SCI_TMP_17336_25925\libRLC_Modelica_im.dll"
  " del libRLC_Modelica_im.exp"                                                                             
  "No se pudo encontrar C:\Users\896905~1.VIA\AppData\Local\Temp\SCI_TMP_17336_25925\libRLC_Modelica_im.exp"
  " del libRLC_Modelica_im.lib"                                                                             
  "No se pudo encontrar C:\Users\896905~1.VIA\AppData\Local\Temp\SCI_TMP_17336_25925\libRLC_Modelica_im.lib"
  "------------- Compile file RLC_Modelica_im.c --------------"                                             
  " IF NOT EXIST  Release mkdir Release"                                                                    
  " cl -D__MSC__ -DFORDLL -D_WIN64 -c -DSTRICT -D_CRT_SECURE_NO_DEPRECATE -D__MAKEFILEVC__ -nologo -I"C:/PROGRA~1/SCILAB~1.0/libs/MALLOC/includes"  -I"C:/PROGRA~1/SCILAB~1.0/libs/f2c"  -I"C:/PROGRA~1/SCILAB~1.0/libs/intl"  -I"C:/PROGRA~1/SCILAB~1.0/modules/core/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/api_scilab/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/call_scilab/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/output_stream/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/jvm/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/localization/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/dynamic_link/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/mexlib/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/time/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/windows_tools/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/threads/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/ast"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/exps"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/operations"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/parse"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/symbol"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/system_env"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/types"  -I"C:/PROGRA~1/SCILAB~1.0/modules/string/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/console/includes" -W3 -Gd -Z7 -O2 -MD -DNDEBUG /Fo"Release/" /Fd"Release/" -D__SCILAB_TOOLBOX__ -DFORDLL  -I"C:/PROGRA~1/SCILAB~1.0/modules/scicos/includes" -I"C:/PROGRA~1/SCILAB~1.0/modules/scicos_blocks/includes" -DNDEBUG -DLIBRLC_MODELICA_IM_GW_EXPORTS RLC_Modelica_im.c"
 
_____________________________________________________________________________________________
"RLC_Modelica_im.c"                                                                                       
"RLC_Modelica_im.c(11): fatal error C1083: 'math.h': No such file or directory"
_____________________________________________________________________________________________

  "NMAKE : fatal error U1077: 'cl -D__MSC__ -DFORDLL -D_WIN64 -c -DSTRICT -D_CRT_SECURE_NO_DEPRECATE -D__MAKEFILEVC__ -nologo -I"C:/PROGRA~1/SCILAB~1.0/libs/MALLOC/includes"  -I"C:/PROGRA~1/SCILAB~1.0/libs/f2c"  -I"C:/PROGRA~1/SCILAB~1.0/libs/intl"  -I"C:/PROGRA~1/SCILAB~1.0/modules/core/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/api_scilab/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/call_scilab/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/output_stream/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/jvm/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/localization/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/dynamic_link/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/mexlib/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/time/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/windows_tools/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/threads/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/ast"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/exps"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/operations"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/parse"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/symbol"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/system_env"  -I"C:/PROGRA~1/SCILAB~1.0/modules/ast/includes/types"  -I"C:/PROGRA~1/SCILAB~1.0/modules/string/includes"  -I"C:/PROGRA~1/SCILAB~1.0/modules/console/includes" -W3 -Gd -Z7 -O2 -MD -DNDEBUG /Fo"Release/" /Fd"Release/" -D__SCILAB_TOOLBOX__ -DFORDLL  -I"C:/PROGRA~1/SCILAB~1.0/modules/scicos/includes" -I"C:/PROGRA~1/SCILAB~1.0/modules/scicos_blocks/includes" -DNDEBUG -DLIBRLC_MODELICA_IM_GW_EXPORTS RLC_Modelica_im.c' : c¾digo devuelto '0x2'"
  

   "Stop."                                                                                                   

  "sorry compiling problem"                         
  "ilib_compile: Error while executing Makelib.mak."

  "c_pass1: build the modelica meta-block failed"

  "xcos_simulate: Error during block parameters update."

Can someone please help me. Thank you.

2

There are 2 best solutions below

1
On

That may be due to a partial VS Studio installation. I suggest to select a msvc and maybe switch to a full Visual Studio installation.

On my machine, all works well with:

--> findmsvccompiler()
 ans  =

  "Visual Studio Community 2022"
1
On

I had the same problem when running a custom Xcos with electrical components.

As suggested by davidcl, I had to install more development packages in the Visual Studio Installer. More specifically, to avoid installing every packages,

  1. Launch Visual Studio Installer
  2. Click Modify
  3. Under Workloads, select and install "Desktop development with C++"

Afterward, Scilab still dropped an error that seemed related to the PATH System variable. Uninstalling and reinstalling Scilab and rebooting my system fixed the issue for me.