Thread Subject: Further trouble compiling simulink model

Subject: Further trouble compiling simulink model

From: Matthew Wade

Date: 30 Jul, 2008 12:12:02

Message: 1 of 1

Hi,

Regarding this thread:
http://www.mathworks.com/matlabcentral/newsreader/view_threa
d/172200#445865

I solved the problem and successfully compiled a Rapid
Simulation executable of a simulink model that can be
updated etc.

I now have a new problem:

- I would like to compile a second simulink model which is
a 2 reactor model (the model above is a 1 reactor model).

- The second model is identical to model one except that
Reactor 1 output values feed into Reactor 2. The kinetics,
stoichometry and states are similar but redefined, such
that:
     - Reactor 1 S-function parameters: Kinetics, Stoich,
General and X0
     - Reactor 2 S-function parameters: Kinetics2, Stoich2,
General, X02 and XINF2 (where XINF2 = influent states from
reactor 1)

So, GENERAL are basic parameters that are consistent with
both reactors 1 and 2 (e.g. temperature).

- Now, I apply exactly the same compilation
procedure/configuration that I did for the 1 reactor model
and get errors in the Linking (see code at bottom). The
errors translate (from Spanish) as:

-> reactor2.obj: error LNK2005: _CalcDerivBiololog already
been defined in reactor.obj

-> .. \ anaerobio_2R.exe: fatal error LNK1169: there were
one or more symbols defined simultaneously

-> NMAKE: fatal error U1077: 'link': x491 code returned'0 '
Stop.

I know the problem is something to do with conflicting
files (e.g. i have reactor.c and reactor2.c, which are
similar, but not identical).

Any thoughts would be appreciated.

Thanks
Matt

Error message below
________________________________________________
### Linking ...
C:\Programme\MATLAB71\sys\perl\win32\bin\perl
C:\Programme\MATLAB71\rtw\c\tools\mkvc_lnk.pl
anaerobio_2R.lnk anaerobio_2R.obj anaerobio_2R_data.obj
rt_nonfinite.obj rsim_main.obj rsim_sup.obj
rsim_mat.obj reactor.obj reactor2.obj
link /RELEASE /INCREMENTAL:NO /NOLOGO -
subsystem:console,4.0 kernel32.lib ws2_32.lib mswsock.lib
advapi32.lib C:\Programme\MATLAB71\rtw\c\lib\win32
\rtwlib_vc.lib C:\Programme\MATLAB71\rtw\c\lib\win32
\libut_vc.lib C:\Programme\MATLAB71\rtw\c\lib\win32
\libmx_vc.lib C:\Programme\MATLAB71\rtw\c\lib\win32
\libmat_vc.lib C:\Programme\MATLAB71\rtw\c\lib\win32
\rsim_engine_vc.lib @anaerobio_2R.lnk -
out:..\anaerobio_2R.exe
reactor2.obj : error LNK2005: ya se defini?
_CalcDerivBiololog en reactor.obj
..\anaerobio_2R.exe : fatal error LNK1169: se encontraron
uno o m?s s?mbolos definidos simult?neamente
NMAKE : fatal error U1077: 'link' : c?digo devuelto '0x491'
Stop.
 
C:\Programme\MATLAB71
\work\Agrobiogas\GUI\agrobiogas_model\agrortw2
\anaerobio_2R_rsim_rtw>echo The make command returned an
error of 2
The make command returned an error of 2

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simulink Matthew Wade 30 Jul, 2008 08:15:07
compiler Matthew Wade 30 Jul, 2008 08:15:07
rapid simulation Matthew Wade 30 Jul, 2008 08:15:07
rssFeed for this Thread

Contact us at files@mathworks.com