Thread Subject: Simscape to C-Code (RTW) - Error

Subject: Simscape to C-Code (RTW) - Error

From: Robert

Date: 22 Sep, 2011 09:52:28

Message: 1 of 1

Hello everyone,

if got some problems concerning"Matlab/Simulink with Simcape to C-Code Conversion and Integration in VS2008. Maybe you can help me...

The Conversion of Matlab/Simulink and Integration in VS2008 works fine for easy Simulink models:

#####Simplified Code#####
#include "Model.h"

Model_HGC_initialize(1);
MdlInitializeSizes();
MdlStart();

while ((double)*Model_M->Timing.t<Model_M->Timing.tFinal)
{
 MdlOutputs(1);
 MdlUpdate(1);
}

Model_terminate();

#####END#####

The results I get from this simulation are fine (I compared Matlab and C-Code results), but still I get some warnings like this one:

#####ERROR-CODE#####
warning C4013: 'MdlInitializeSizes' undefiniert; Annahme: extern mit Rückgabetyp int

(Sorry, I had to translate it by myself. This translation is not correct:)
warning C4013: 'MdlInitializeSizes' undefined; Presumption: extern with return-type int
#####END#####

But my main-problem is using Simscape-components:

#####ERROR-CODE#####
error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_neu_destroy_int_vector" in Funktion "_Model_terminate".

error LNK2019: Unresolved external symbol "_neu_destroy_int_vector" in function "_Model_terminate".
#####END#####

I get this message for 6 functions, which all relate to the "Solver Configuration Block" somehow:
_neu_destroy_int_vector
_ne_default_allocator
_neu_create_int_vector
_nes_create_simulator_dae_imp
_ne_dae_create
_Model_HGC_4296f262
_nei_create_input_processor

(btw: _nesl_tlc.h is included)

Any help is appreciated!

Robert

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
ccode simcape s... Robert 22 Sep, 2011 05:54:15
rssFeed for this Thread

Contact us at files@mathworks.com