LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to switch /bigobj option when generating .dll file using matlab simulink

Hi, 

   I am trying to use simulation interface toolkit to convert my simulink model into .dll. Seems like the system is too big and matlab is asking me to switch on "bigobject" using "/bigobj" command. I wouldl like to know if anyone knows how this could be done. I am using visual studio 2008 as the compiler. 

 

Regards,

Kumar

0 Kudos
Message 1 of 4
(3,818 Views)

Hello Kumar,

 

Please provide more information on the error you are encountering (error code, screen capture or full transcript of the error message, etc.)- knowing precisely what the error being reported is will assist greatly.

 

Could you also let us know what software you are attempting to use both before and after compiling? (versions are important)

 

Have you been able to compile a smaller model? How large is the model in question?

 

I would recommend doing an internet search on "Visual Studio makefile /bigobj" or similar phrases; there is quite a bit of information available on how to configure this option.  These pages may also get you started:

 

http://msdn.microsoft.com/en-us/library/vstudio/ms173499(v=vs.90).aspx

 

http://www.mathworks.com/support/solutions/en/data/1-CENZRW/index.html?product=RT&solution=1-CENZRW

 

Hope that helps!

 

Regards,

Tom L.
0 Kudos
Message 2 of 4
(3,799 Views)

Thank you for your suggestions and your reply

 

1. The following is the error message that I receive:

 

c:\users\....\documents\matlab\...._nidll_rtw\.....c(86966) : fatal error C1128: number of sections exceeded object file format limit : compile with /bigobj

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x1'

Stop.

 

C:\Users\kprabaka\Documents\MATLAB\...._nidll_rtw>echo The make command returned an error of 2 

The make command returned an error of 2

 

C:\Users\kprabaka\Documents\MATLAB\...._nidll_rtw>An_error_occurred_during_the_call_to_make

'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,

operable program or batch file.

### Build procedure for model: '....' aborted due to an error. "

 

 

2. Could you also let us know what software you are attempting to use both before and after compiling? (versions are important)

           I am using Labview 2012, SImulation interface toolkit, along with Matlab 2012b, and Matlab compiler (the version that comes with 2012b). Also I use visual studio 2008.

 

3. Have you been able to compile a smaller model? How large is the model in question?

            Yes. I have compiled smaller models before. It works fine for smaller models. It is very hard to define how big the model is. But, It takes one hour to compile the entire model. But, this could also be due to the fact that I have a lot of scopes which makes it harder for simulink to compile. I do not know whether there is a limit on the size of the system that could be converted to the .dll. 

 

4. Thank you for the links. I read them and they indicate half of the solution. I did not know earlier how to pass this command "/bigobj", but after reading the links, it seems like I have to add the "/bigobj" line to the "nidll_vc.tmc". 

 

The problem I am facing right now is, I am not sure what is the right way to edit the .tmc file. I guess, it would be great if someone could let me about the right way to edit the .tmc file.

 

Regards,

Kumar

 

 

 

0 Kudos
Message 3 of 4
(3,791 Views)

Hello Kumar,

 

As per the first document I linked, the easiest approach may be to set the option in the compiler rather than attempting to modify the .tmc; refer to "To set this compiler option in the Visual Studio development environment" for the steps to take.

 

Regards,

Tom L.
0 Kudos
Message 4 of 4
(3,776 Views)