Unexplained error while building DLL

I wish to convert my simulink model into a DLL for use with another s/w. When I try to build the model it simply says 'Error(s) encountered while building model'. When I run the model, there are no error messages. How can I find out what has gone wrong?
Thank you for your input guys.. I am using ert_shrlib.tlc for building the DLL. And thanks, I did find more information on the command window. The error which causes abort is 'Missing Exports'. It seems the '_filename_step' function doesnt have a definition along with '_rtU' and '_rtY'. When I checked the Code Generation report, the step function has been called within rt_OneStep, but there is no definition for the function to be found.

3 commentaires

Kaustubha Govind
Kaustubha Govind le 1 Août 2012
Are you using Ctrl+B or rtwbuild to generate the DLL? Are you using ert_shrlib.tlc as the System Target file, or something else? It is strange that you are not seeing the actual errors reported - nothing in the popup window or MATLAB command window?
Albert Yam
Albert Yam le 1 Août 2012
As Kaustubha mentioned, the popup window or the MATLAB command window should give more information. Sometimes one or the other is completely useless for information, but there should be something.
Also, you said while building model. Does that mean it got through the initial run? Did you see a lot of dots..................................................................?
Arun
Arun le 2 Août 2012
I am using ert_shrlib.tlc for building the DLL. And thanks, I did find more information on the command window. The error which causes abort is 'Missing Exports'. It seems the '_filename_step' function doesnt have a definition along with '_rtU' and '_rtY'. When I checked the Code Generation report, the step function has been called within rt_OneStep, but there is no definition for the function to be found.

Connectez-vous pour commenter.

Réponses (1)

Kaustubha Govind
Kaustubha Govind le 3 Août 2012
Modifié(e) : Kaustubha Govind le 3 Août 2012

0 votes

That's strange. Is there a model.c file generated? The model _step function should be generated into it?
Also, could you try this with a demo model, such as rtwdemo_counter (simply type the model name at the MATLAB prompt to open it up)?

5 commentaires

Arun
Arun le 3 Août 2012
Modifié(e) : Arun le 3 Août 2012
Thank you for the suggestion. I did try it with demo models too. But had the same results.. model.c file is generated and the step function 'rtwdemo_counter_step();' is called within 'rt_OneStep'. But there is no definition of 'rtwdemo_counter_step(); available..
Arun
Arun le 3 Août 2012
Modifié(e) : Arun le 3 Août 2012
Command Window log:
### Starting Real-Time Workshop build procedure for model: rtwdemo_counter
D:/MATLAB~1\sys\lcc\bin\lcc -c -Fortwdemo_counter.obj -DMODEL=rtwdemo_counter -DNUMST=1 -DNCSTATES=0 -DMAT_FILE=0 -DINTEGER_CODE=0 -DONESTEPFCN=1 -DTERMFCN=1 -DHAVESTDIO -DMULTI_INSTANCE_CODE=0 -DMT=0 -I. -I.. -ID:/MATLAB~1\simulink\include -ID:/MATLAB~1\extern\include -ID:/MATLAB~1\rtw\c\src -ID:/MATLAB~1\rtw\c\libsrc -ID:/MATLAB~1\rtw\c\src\ext_mode\common -ID:/MATLAB~1\rtw\c\src\ext_mode\tcpip -ID:/MATLAB~1\rtw\c\src\ext_mode\serial -ID:/MATLAB~1\rtw\c\src\ext_mode\custom -ID:/Tmp_2DEL/rtwdemo_counter_ert_shrlib_rtw -ID:/Tmp_2DEL -ID:/MATLAB~1/toolbox/rtw/rtwdemos -ID:/MATLAB~1\sys\lcc\include -w -noregistrylookup rtwdemo_counter.c
D:/MATLAB~1\sys\lcc\bin\lcclnk -s -LD:/MATLAB~1\sys\lcc\lib -dll -o ../rtwdemo_counter_win32.dll rtwdemo_counter.obj lcc_dll_main.obj @rtwdemo_counter_ref.rsp rtwdemo_counter.def
Specified export _rtwdemo_counter_U is not defined
Specified export _rtwdemo_counter_Y is not defined
Specified export _rtwdemo_counter_step is not defined
Missing exports. Aborting
gmake: * [../rtwdemo_counter_win32.dll] Error 1
Kaustubha Govind
Kaustubha Govind le 3 Août 2012
Very very strange. I wonder if something is corrupt with your installation? Do you have access to any other installation to try this out?
Arun
Arun le 6 Août 2012
I checked the same with the installations on my colleagues PCs. I found that all the 2010a installation had this problem. And the 2009a version was working ok. So I guess there is reason to suspect the installation of 2010a package as we all used the same package. It is interesting that there were no errors shown during the install.
Kaustubha Govind
Kaustubha Govind le 7 Août 2012
Arun: Could you try re-installing? If that doesn't work, please contact MathWorks Tech Support.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware dans Centre d'aide et File Exchange

Question posée :

le 1 Août 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by