C

Asked • 05/26/19

Compiling C S-Function in MATLAB multiple definition error?

I am trying to compile various C-Functions in MATLAB Simulink using the S-function builder block and the minGW 64bit Compiler. A syntax error in the code is impossible since it is code from an ECU which is in production and running for years. I keep getting the following error message with two of my files: > ...example.obj:example.c:(.text+0x0): multiple definition of `example' > ...example.obj:example.c:(.text+0x0): first defined here The error confuses me since it is referring to the same position as the "first definition". In the other functions it is position (`.text+0x17a`). Has any of you guys faced the same problem or any idea how to fix it? Can it be a bug of the compiler? Greetings from Germany, Jonathan

1 Expert Answer

By:

Leo P. answered • 08/19/23

Tutor
New to Wyzant

Professional C tutor for the University of Central Florida

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.