Skip to content

undefined reference to `main' from MATLAB R2017a #2

@nearlabnes

Description

@nearlabnes

Compiling test.slx this error comes up:

/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function '_start': (.text+0x20): undefined reference to 'main' collect2: error: ld returned 1 exit status gmake: *** [../test_simple] Error 1

It seems that ert_main.c is not correctly linked with the new compiler (MATLAB R2017b).

According to Sriram

I was able to build the model by adding ert_main.c to MODULES inside the model .mk file generated by the template makefile. I am using R2017b and I think this is an issue with the template makefile.
but I was not able to solve the issue, please provide some hints.

https://rtime.felk.cvut.cz/~sojka/blog/on-generating-linux-applications-from-simulink/#comment-1732b017230b5b064a73840bd14ee4fa

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions