<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173487</link>
    <title>MATLAB Central Newsreader - Further trouble compiling simulink model</title>
    <description>Feed for thread: Further trouble compiling simulink model</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 30 Jul 2008 12:12:02 -0400</pubDate>
      <title>Further trouble compiling simulink model</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173487#446263</link>
      <author>Matthew Wade</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
Regarding this thread:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_threa&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_threa&lt;/a&gt;&lt;br&gt;
d/172200#445865&lt;br&gt;
&lt;br&gt;
I solved the problem and successfully compiled a Rapid &lt;br&gt;
Simulation executable of a simulink model that can be &lt;br&gt;
updated etc.&lt;br&gt;
&lt;br&gt;
I now have a new problem:&lt;br&gt;
&lt;br&gt;
- I would like to compile a second simulink model which is &lt;br&gt;
a 2 reactor model (the model above is a 1 reactor model).&lt;br&gt;
&lt;br&gt;
- The second model is identical to model one except that &lt;br&gt;
Reactor 1 output values feed into Reactor 2. The kinetics, &lt;br&gt;
stoichometry and states are similar but redefined, such &lt;br&gt;
that:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- Reactor 1 S-function parameters: Kinetics, Stoich,  &lt;br&gt;
General and X0&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- Reactor 2 S-function parameters: Kinetics2, Stoich2, &lt;br&gt;
General, X02 and XINF2 (where XINF2 = influent states from &lt;br&gt;
reactor 1)&lt;br&gt;
&lt;br&gt;
So, GENERAL are basic parameters that are consistent with &lt;br&gt;
both reactors 1 and 2 (e.g. temperature).&lt;br&gt;
&lt;br&gt;
- Now, I apply exactly the same compilation &lt;br&gt;
procedure/configuration that I did for the 1 reactor model &lt;br&gt;
and get errors in the Linking (see code at bottom). The &lt;br&gt;
errors translate (from Spanish) as:&lt;br&gt;
&lt;br&gt;
-&amp;gt; reactor2.obj: error LNK2005: _CalcDerivBiololog already &lt;br&gt;
been defined in reactor.obj &lt;br&gt;
&lt;br&gt;
-&amp;gt; .. \ anaerobio_2R.exe: fatal error LNK1169: there were &lt;br&gt;
one or more symbols defined simultaneously &lt;br&gt;
&lt;br&gt;
-&amp;gt; NMAKE: fatal error U1077: 'link': x491 code returned'0 ' &lt;br&gt;
Stop.&lt;br&gt;
&lt;br&gt;
I know the problem is something to do with conflicting &lt;br&gt;
files (e.g. i have reactor.c and reactor2.c, which are &lt;br&gt;
similar, but not identical).&lt;br&gt;
&lt;br&gt;
Any thoughts would be appreciated.&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
Matt&lt;br&gt;
&lt;br&gt;
Error message below&lt;br&gt;
________________________________________________&lt;br&gt;
### Linking ... &lt;br&gt;
	C:\Programme\MATLAB71\sys\perl\win32\bin\perl &lt;br&gt;
C:\Programme\MATLAB71\rtw\c\tools\mkvc_lnk.pl &lt;br&gt;
anaerobio_2R.lnk anaerobio_2R.obj anaerobio_2R_data.obj &lt;br&gt;
rt_nonfinite.obj  rsim_main.obj rsim_sup.obj &lt;br&gt;
rsim_mat.obj    reactor.obj reactor2.obj  &lt;br&gt;
	link /RELEASE  /INCREMENTAL:NO /NOLOGO -&lt;br&gt;
subsystem:console,4.0  kernel32.lib  ws2_32.lib mswsock.lib &lt;br&gt;
advapi32.lib    C:\Programme\MATLAB71\rtw\c\lib\win32&lt;br&gt;
\rtwlib_vc.lib C:\Programme\MATLAB71\rtw\c\lib\win32&lt;br&gt;
\libut_vc.lib  C:\Programme\MATLAB71\rtw\c\lib\win32&lt;br&gt;
\libmx_vc.lib  C:\Programme\MATLAB71\rtw\c\lib\win32&lt;br&gt;
\libmat_vc.lib C:\Programme\MATLAB71\rtw\c\lib\win32&lt;br&gt;
\rsim_engine_vc.lib @anaerobio_2R.lnk -&lt;br&gt;
out:..\anaerobio_2R.exe &lt;br&gt;
reactor2.obj : error LNK2005: ya se defini? &lt;br&gt;
_CalcDerivBiololog en reactor.obj &lt;br&gt;
..\anaerobio_2R.exe : fatal error LNK1169: se encontraron &lt;br&gt;
uno o m?s s?mbolos definidos simult?neamente &lt;br&gt;
NMAKE : fatal error U1077: 'link' : c?digo devuelto '0x491' &lt;br&gt;
Stop. &lt;br&gt;
&amp;nbsp;&lt;br&gt;
C:\Programme\MATLAB71&lt;br&gt;
\work\Agrobiogas\GUI\agrobiogas_model\agrortw2&lt;br&gt;
\anaerobio_2R_rsim_rtw&amp;gt;echo The make command returned an &lt;br&gt;
error of 2  &lt;br&gt;
The make command returned an error of 2 </description>
    </item>
  </channel>
</rss>

