Compilation
FAQ C07 - What can I do when I get the following compilation warning message: "Object file is older than source"?
Category: Simcenter Amesim
Topic: Compilation
Access Level: End User
Publish Date: April 2011
Question
What can I do when I get the following compilation warning message: Object file is older than source?
Answer
This error is due to the fact that the corresponding submodel must be recompiled either with Submodel Editor, or using a compilation script in a command window. This will ensure that the object file of the submodel is more recent than its source file.
To recompile the submodel with Submodel Editor, please refer to the Submodel Editor help:
Using Windows:
Using Linux:
To recompile the submodel with a script in a command window, please follow the instructions below:
Procedure
Open a command window.
First make sure that you are in the submodels directory which contains the submodel source file (.c) and the submodel specification file (.spe).
Make sure that environment variables are correctly set:
The AME environment variable must exist and point to the Simcenter Amesim installation directory.
Under Windows: The PATH environment variable must contain at least the following sequence of paths: %AME%;%AME%\win32;%AME%\win64;%AME%\sys\mingw64\bin;%AME%\sys\python\win64
Under Linux: The PATH environment variable must contain the path to the Simcenter Amesim installation directory.
- Then recompile the submodel:You first have to know which compiler is used. To achieve this, select the Tools
Preferences menu item in Simcenter Amesim and move to the Compilation tab as shown below:
The currently selected compiler is checked in the Active compiler section.
- Then go back to the command window.
If you are using the Microsoft Visual C++ compiler: type AMEcc_RELEASE *.c and press Enter.
If you are using the GNU GCC compiler: type AMEcc_RELEASE –gcc *.c and press Enter.
Note
If the argument is *.c as in the example above, the complete set of submodels will be recompiled. If you only want to recompile one submodel (assume it is called MYSUB50.c), then type: AMEcc_RELEASE MYSUB50.c or AMEcc_RELEASE –gcc MYSUB50.c and press Enter.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.faqs/xid1847164 · retrieved 2026-07-17