cancel
Showing results for 
Search instead for 
Did you mean: 

Problem of compilation in Amesim of Ameset's submodel

Experimenter
Experimenter

Hello,

for a project i have to work on Ameset, to learn how to use it i'm doing the examples in Amehelp. For the first two examples i had no problems but now i have an error message when i try to compile my submodel in Amesim.

 

Message-erreur.png

When i tried to solve this problem i've noticed that the submodels who worked had a file ".obj" in "win32" but not those who did'nt work, there is just a ".o" file in "win32-gcc".

 

In order to try to solve the problem i've deleted all my submodels, removed the file where they were saved from the "path list" and i tried to do again a submodel. But the problem is still here, i don't have the "win32" file, just the "win32-gcc".

 

Any idea to solve this?

 

Thank you

 

Jean-Baptiste

2 REPLIES

Re: Problem of compilation in Amesim of Ameset's submodel

Siemens Experimenter Siemens Experimenter
Siemens Experimenter

Hello JiBé,

 

The error is produced because when Amesim tries to compile your sketch it will assemble all the required submodel code. Since it is compiling it using the Microsoft Visual compiler it will look for the corresponding .obj files. These files are stored in the submodels\win32 folder.

If you compile your submodel files (in Ameset) with gcc, they will have the .o extension and be stored in the win32-gcc folder.

The problem is that you are probably not compiling your submodel using Microsof Visual (so no .obj are created). You are only compiling them using gcc (the .o).

 

You can define what compiler to use in Ameset. In rev15 this is done by going to Tools > Options > Preferences:

preferences.PNG

Here you should make sure Microsoft Visual (win32) is checked.

 

A quicker option: If you already have the submodels compiled in gcc (and Ameset is also configured to use gcc ), you can simply tell Amesim to use gcc instead of Microsoft Visual!

Go to Tools> Options > Preferences and under the Compilation tab choose GNU GCC (32-bit):

 

preferencesAmesim.PNG

 

And the model should compile.

 

I hope this helps!

 

Best regards,

ElecKid

Re: Problem of compilation in Amesim of Ameset's submodel

Experimenter
Experimenter
It worked, thanks a lot!