Thread Subject: Compiling Simulink problem

Subject: Compiling Simulink problem

From: Matthew Wade

Date: 14 Jul, 2008 13:45:04

Message: 1 of 5

Hi,

Some days ago I posted on a problem that I was having with
compiling a simulink model using Real-Time Workshop:

http://www.mathworks.com/matlabcentral/newsreader/view_threa
d/172334#442216

After some investigation I found that the model compiles
fine on my colleagues computer (in Spain, so no chance to
play around).

The only conceivable reason is that he uses Visual Studio
C/C++ compiler and I only have the base lcc compiler.

He already compiled some of the c-code that the model
blocks use using this Vis Studio compiler, so am I right in
thinking that my lcc compiler will not be able to use these
c files during the Real Time Workshop Build process?

Cheers
Matt

Subject: Compiling Simulink problem

From: Guoliang Zhang

Date: 14 Jul, 2008 21:02:41

Message: 2 of 5

what is the "reactor"? is it another model, hand-code or your s-function's
name?

did your parterner send you the source files for the sfunction?

it seems you are missing some files, not the compiler's problem

GZ

"Matthew Wade" <cosmicspacepig@googlemail.com> wrote in message
news:g5fl90$8$1@fred.mathworks.com...
> Hi,
>
> Some days ago I posted on a problem that I was having with
> compiling a simulink model using Real-Time Workshop:
>
> http://www.mathworks.com/matlabcentral/newsreader/view_threa
> d/172334#442216
>
> After some investigation I found that the model compiles
> fine on my colleagues computer (in Spain, so no chance to
> play around).
>
> The only conceivable reason is that he uses Visual Studio
> C/C++ compiler and I only have the base lcc compiler.
>
> He already compiled some of the c-code that the model
> blocks use using this Vis Studio compiler, so am I right in
> thinking that my lcc compiler will not be able to use these
> c files during the Real Time Workshop Build process?
>
> Cheers
> Matt
>


Subject: Compiling Simulink problem

From: Matthew Wade

Date: 15 Jul, 2008 09:40:19

Message: 3 of 5

Guoliang,

The Reactor file is the c-file used by the "reactor block"
in the simulink model and, from what my colleague says, was
compiled using Visual Studio.

I asked him to try RT Workshop using the LCC compiler
(default) and the Visual Studio compiler. He successfully
managed to compile the simulink model with the visual
studio but not LCC.

This suggests that because reactor.c was compiled with
visual studio, I must also compile the simulink model with
visual studio.

Is the only option to purchase Visual Studio?

Cheers,

Matt

"Guoliang Zhang" <zhangl@mathworks.com> wrote in message
<g5geua$81b$1@fred.mathworks.com>...
> what is the "reactor"? is it another model, hand-code or
your s-function's
> name?
>
> did your parterner send you the source files for the
sfunction?
>
> it seems you are missing some files, not the compiler's
problem
>
> GZ
>

Subject: Compiling Simulink problem

From: Guoliang Zhang

Date: 15 Jul, 2008 14:33:00

Message: 4 of 5

if your colleague only sent you the OBJ file that was compiled from
reactor.c, that obj file is sensitive to compiler of his choice. . in this
case, you would need to have visual studio (good news there is a free
version called Visual Studio Express that Matlab do support since R2007b).
But that would result in Linker error instead of compiler error. To help you
further can you answer these questions?

Do you have all your source files? are all sources files written in C (not
c++)? Did you rename any Sfunctions?

can you paste the full log from matlab output (choose verbose from
configuration parameters->Real-Time Workshop->Debug->Verbose)? what is the
line 775 and its surrounding lines of code? (can you post a snippet of this
section of code?)

Regards

GZ




if you DO have the source file of reactor.c (and all other source files you
would need), then there should be no issue regarding the compiler in use. It
might be the configuration settings

"Matthew Wade" <cosmicspacepig@googlemail.com> wrote in message
news:g5hra2$63s$1@fred.mathworks.com...
> Guoliang,
>
> The Reactor file is the c-file used by the "reactor block"
> in the simulink model and, from what my colleague says, was
> compiled using Visual Studio.
>
> I asked him to try RT Workshop using the LCC compiler
> (default) and the Visual Studio compiler. He successfully
> managed to compile the simulink model with the visual
> studio but not LCC.
>
> This suggests that because reactor.c was compiled with
> visual studio, I must also compile the simulink model with
> visual studio.
>
> Is the only option to purchase Visual Studio?
>
> Cheers,
>
> Matt
>
> "Guoliang Zhang" <zhangl@mathworks.com> wrote in message
> <g5geua$81b$1@fred.mathworks.com>...
>> what is the "reactor"? is it another model, hand-code or
> your s-function's
>> name?
>>
>> did your parterner send you the source files for the
> sfunction?
>>
>> it seems you are missing some files, not the compiler's
> problem
>>
>> GZ
>>
>


Subject: Compiling Simulink problem

From: Matthew Wade

Date: 16 Jul, 2008 07:00:07

Message: 5 of 5

Hi GZ,

As I am away from the office for the next week I wont be
able to access the code and give you the error log.

With regard to the other questions:

I have all the files necessary to run the simulink model. I
do not know if there are extra files missing, but I can ask
my colleague. I will also ask i he used C or C++.

No S-function name was changed.

As my colleague can compile the model with Visal Studio not
LCC, I assume that this is the problem. But it could also
be that he has "all files" on his computer and passed only
those necessary to operate the model inside Simulink/Matlab
environment.

Best regards,

Matt




"Guoliang Zhang" <zhangl@mathworks.com> wrote in message
<g5ices$n29$1@fred.mathworks.com>...
> if your colleague only sent you the OBJ file that was
compiled from
> reactor.c, that obj file is sensitive to compiler of his
choice. . in this
> case, you would need to have visual studio (good news
there is a free
> version called Visual Studio Express that Matlab do
support since R2007b).
> But that would result in Linker error instead of compiler
error. To help you
> further can you answer these questions?
>
> Do you have all your source files? are all sources files
written in C (not
> c++)? Did you rename any Sfunctions?
>
> can you paste the full log from matlab output (choose
verbose from
> configuration parameters->Real-Time Workshop->Debug-
>Verbose)? what is the
> line 775 and its surrounding lines of code? (can you post
a snippet of this
> section of code?)
>
> Regards
>
> GZ
>
>
>
>
> if you DO have the source file of reactor.c (and all
other source files you
> would need), then there should be no issue regarding the
compiler in use. It
> might be the configuration settings
>
> "Matthew Wade" <cosmicspacepig@googlemail.com> wrote in
message
> news:g5hra2$63s$1@fred.mathworks.com...
> > Guoliang,
> >
> > The Reactor file is the c-file used by the "reactor
block"
> > in the simulink model and, from what my colleague says,
was
> > compiled using Visual Studio.
> >
> > I asked him to try RT Workshop using the LCC compiler
> > (default) and the Visual Studio compiler. He
successfully
> > managed to compile the simulink model with the visual
> > studio but not LCC.
> >
> > This suggests that because reactor.c was compiled with
> > visual studio, I must also compile the simulink model
with
> > visual studio.
> >
> > Is the only option to purchase Visual Studio?
> >
> > Cheers,
> >
> > Matt
> >
> > "Guoliang Zhang" <zhangl@mathworks.com> wrote in message
> > <g5geua$81b$1@fred.mathworks.com>...
> >> what is the "reactor"? is it another model, hand-code
or
> > your s-function's
> >> name?
> >>
> >> did your parterner send you the source files for the
> > sfunction?
> >>
> >> it seems you are missing some files, not the compiler's
> > problem
> >>
> >> GZ
> >>
> >
>
>

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
compiler Matthew Wade 14 Jul, 2008 09:45:16
real time workshop Matthew Wade 14 Jul, 2008 09:45:15
simulink Matthew Wade 14 Jul, 2008 09:45:15
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com