Cancel
Showing results for 
Search instead for 
Did you mean: 

Error while compiling FMU block using C++ compiler

Experimenter
Experimenter

Hi All,

 

I've installed the 64 bit C++ compiler following the Tips & Tricks from this website. When I try to compile an imported FMU block in Amesim using this compiler, I receive the following error:

 

C:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\AMEcompile.bat initiates a 64 bit compilation

 

ERROR: The system was unable to find the specified registry key or value.

 

Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.

 

Targeting Windows 7 x64 Debug

  

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01

Copyright (C) Microsoft Corporation. All rights reserved.

  

"C:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces\user_cosim\win32\ame_user_cosim_dyncompile" cl.exe -c -DAMEUSERCOSIM -DSTANDALONESIMULATOR -I"C:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces\user_cosim" -I"C:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces\standalonesimulator" -I"C:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces" -I"C:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\lib" -nologo -DWIN32 -MT -W3 -Od -D "_MBCS" -EHsc -wd4996 -bigobj -o Testmodel_ZF_.obj Testmodel_ZF_.c

 

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release

 

 Testmodel_ZF_.c

 

c:\program files (x86)\lms\lms imagine.lab\v1520\amesim\interfaces\standalonesimulator\ChannelsRedirectionC.h(6) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

 

Executing cl.exe "-c" "-DAMEUSERCOSIM" "-DSTANDALONESIMULATOR" "-IC:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces\user_cosim" "-IC:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces\standalonesimulator" "-IC:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces" "-IC:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\lib" "-nologo" "-DWIN32" "-MT" "-W3" "-Od" "-D" "_MBCS" "-EHsc" "-wd4996" "-bigobj" "-o" "Testmodel_ZF_.obj" "Testmodel_ZF_.c"

 

NMAKE : fatal error U1077: '"C:\Program Files (x86)\LMS\LMS Imagine.Lab\v1520\Amesim\interfaces\user_cosim\win32\ame_user_cosim_dyncompile.EXE"' : return code '0x2'

Stop.

 

\LMS\LMS was unexpected at this time.

 

Seems like he's not able to find the windows.h file. After searching the internet for this error, I found that this file should be in the "include" directory of the SDK installation. However, there is no such directory on my computer. Can anyone help me with this?

2 REPLIES

Re: Error while compiling FMU block using C++ compiler

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello @Marion,

it looks like you're having an issue similar to @ValentinP...

First, it's safe to ignore the first error about the registry key.

Try defining an environment variable: MSSDK="C:\Program Files\Microsoft SDKs\Windows\v7.1" if that folder exists, on my install it does indeed contain the include folder with the missing header. Make sure to restart when you have done so. If you do't see the SDK folder I'm afraid you will have to reinstall the SDK. If that still fails I advise you get in touch with the hotline (GTAC).

 

Re: Error while compiling FMU block using C++ compiler

Experimenter
Experimenter

Hello @Emmanuel_D,

 

Thanks for your answer. Reinstalling all programms (SDK, .Net Framework, Visual C++) worked for me!