0

I am a beginner on Dymola and I have a problem with the compiler to do simulation. I tried to install Visual Studio 2017 community (with the C++ development package). But when I try to verify the compiler I have an error :

Command cannot be executed.
Dymola cannot compile a simple C-program, dsmodel.c in current directory.
Please check compiler installation

with the following text :

Compiling and linking the model (Visual C++). 

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.27
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
"Testing 32-bit compilation" 
dsmodel.c
dsmodel.c(1): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'stdio.h'ÿ: No such file or directory
 
Error generating Dymosim.

I tried to uninstall and reinstall Visual studio, install another version (2012, 2015 and 2019) but nothing works. Someone know what can be the problem and how can I fix it ?

Thanks,

Vverdet

marco
  • 5,944
  • 10
  • 22
  • possibly related: https://stackoverflow.com/questions/45185108/microsoft-visual-c-compiler-for-dymola – matth Jun 07 '21 at 08:32

2 Answers2

1

Have you tried starting Visual Studio (without involving Dymola at all)? It might set up something during it's first start up.

Dag B
  • 621
  • 3
  • 8
  • Remember to also open a C++ file/project in Visual Studio, as some installation might even be delayed until that point. – Hans Olsson Oct 07 '20 at 07:39
  • Hi, thanks for the reply. Yes I tried to start VS (and open a C++ file) but no changement for Dymola. – Vverdet Oct 07 '20 at 08:06
  • So you could compile and run a C++ program using VS, but it did not work in Dymola? Contact tech support. – Dag B Oct 08 '20 at 08:19
0

Based on my previous experience, it is likely that you messed up the PATH variables in Windows Settings.

Please check the PATH variable in the list of system environment variables. Make sure the following directories are in the value of PATH variable:

  • %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
  • %SystemRoot%\system32
  • %SystemRoot%
  • %SystemRoot%\System32\Wbem
  • <Your_Dymola_installation_location>\bin64