WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

XPCTarget - Probleme beim compilieren / Linken des Beispiels

 

Stefan

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 22.11.2007, 23:26     Titel: XPCTarget - Probleme beim compilieren / Linken des Beispiels
  Antworten mit Zitat      
Hallo,
Ich bin kurz davor zuverzweifeln. Ich möchte das mit Matlab mitgelieferte Beispiel xpcosc.mdl compilieren.
Ich habe Visual Studio 2005 Standard installiert.

Ich bekomme folgende Fehlermeldung:

LIBCMT.lib(calloc.obj) : error LNK2005: _calloc ist bereits in rttheap.lib(rttheap.obj) definiert.

Mein Vorgehen war so. Als ich das erste mal "build" startete bekam ich die Fehlermeldung, dass nmake nicht gefunden wird. Ich habe dann festgestellt, dass die Umgebungsvariablen nicht gesetzt waren. Immer wenn der Hinweis xxx wurde nicht gefunden ausgegeben wurde, habe ich den zugehörigen Pfad der Datei in die Windows Umgebungsvariablen INCLUDE, oder LIB, oder PATH geschrieben. Jetzt bekomme ich aber die obige Meldung und komme mit dieser Methode nicht weiter.

Kann mir bitte jemand einen Hinweis geben? Ich sitze schon eine Woche daran, xpctarget lauffähig zu bekommen.

Viele Grüße
Stefan.


Falls es weiterhelfen könnte habe ich hier noch die vollständige Ausgabe im Matlab Command window:

Code:

### Starting xPC Target build procedure for model: xpcosc
### Generating code into build directory: C:\Programme\MATLAB71\work\xpcosc_xpc_rtw
### Invoking Target Language Compiler on xpcosc.rtw
   tlc
   -r
   C:\Programme\MATLAB71\work\xpcosc_xpc_rtw\xpcosc.rtw
   C:\Programme\Matlab71\toolbox\rtw\targets\xpc\xpc\xpctarget.tlc
   -OC:\Programme\MATLAB71\work\xpcosc_xpc_rtw
   -IC:\Programme\Matlab71\toolbox\rtw\targets\xpc\xpc
   -IC:\Programme\MATLAB71\work\xpcosc_xpc_rtw\tlc
   -IC:\Programme\Matlab71\rtw\c\tlc\mw
   -IC:\Programme\Matlab71\rtw\c\tlc\lib
   -IC:\Programme\Matlab71\rtw\c\tlc\blocks
   -IC:\Programme\Matlab71\rtw\c\tlc\fixpt
   -IC:\Programme\Matlab71\stateflow\c\tlc
   -aEnforceIntegerDowncast=1
   -aFoldNonRolledExpr=1
   -aInlineInvariantSignals=0
   -aInlineParameters=0
   -aLocalBlockOutputs=0
   -aRollThreshold=5
   -aGenerateReport=0
   -aGenCodeOnly=0
   -aRTWVerbose=1
   -aIncludeHyperlinkInReport=0
   -aLaunchReport=0
   -aForceParamTrailComments=0
   -aGenerateComments=1
   -aIgnoreCustomStorageClasses=1
   -aIncHierarchyInIds=0
   -aMaxRTWIdLen=31
   -aShowEliminatedStatements=1
   -aPrefixModelToSubsysFcnNames=1
   -aIncDataTypeInIds=0
   -aInsertBlockDesc=0
   -aSimulinkBlockComments=1
   -aInlinedPrmAccess="Literals"
   -aTargetFcnLib="ansi_tfl_tmw.mat"
   -aIsPILTarget=0
   -aLogVarNameModifier="rt_"
   -aGenerateFullHeader=1
   -aRL32ModeModifier="Real-Time"
   -aExtMode=1
   -aExtModeMexArgs=""
   -aExtModeArmWhenConnect=0
   -aRL32LogTETModifier=1
   -aRL32LogBufSizeModifier="100000"
   -aRL32IRQSourceModifier="Timer"
   -axPCIRQSourceBoard="None/Other"
   -axPCIOIRQSlot="-1"
   -axpcDblBuff=0
   -axpcObjCom=0
   -axPCGenerateASAP2=0
   -aRL32ObjectName="tg"
   -axPCisDownloadable=1
   -axPCisDefaultEnv=1
   -axPCTargetPCEnvName=""
   -p10000


### Loading TLC function libraries

.....
### Initial pass through model to cache user defined code
### Caching model source code
.......
### Generating TLC interface API.
..
### Writing source file xpcosc_capi.c
..
### Writing header file xpcosc_capi.h
...................
### Writing header file xpcosc_types.h
### Writing header file xpcosc.h
.
### Writing source file xpcosc.c
### Writing header file xpcosc_private.h
### Writing header file rtmodel.h
### Writing source file xpcosc_data.c
.
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### TLC code generation complete.
### Creating data type transition file xpcosc_dt.h
.
### Creating xPC Options Header file xpcoptions.h.
### Creating xPC Definition File xpcvcdll.def
### Creating model Hierarchy xml  xpcosc.xml
### Creating block IO files xpcosc_bio.c, xpcoscbio.m
.
### Creating parameter tuning files xpcosc_pt.c, xpcoscpt.m
### Patch bio and pt M-file
### Create sorted BIO
### Create sorted PT
### Patch Scope blocks
### xpcosc.mk which is generated from C:\Programme\Matlab71\toolbox\rtw\targets\xpc\xpc\xpc_vc.tmf is up to date
### Building xpcosc: .\xpcosc.bat
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>set MATLAB=C:\Programme\Matlab71  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>set MSVCDir=c:\programme\microsoft_visual_studio_8\vc7  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>"C:\Programme\Matlab71\rtw\bin\win32\envcheck" INCLUDE "c:\programme\microsoft_visual_studio_8\vc7\platformsdk\include"  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>if errorlevel 1 goto vcvars32  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>set VSINSTALLDIR=c:\programme\microsoft_visual_studio_8\common7\ide  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>set VCINSTALLDIR=c:\programme\microsoft_visual_studio_8  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>set FrameworkSDKDir=c:\programme\microsoft_visual_studio_8\FrameworkSDK  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>set FrameworkDir=c:\programme\microsoft_visual_studio_8\Framework  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>call "C:\Programme\Matlab71\toolbox\rtw\rtw\private\vcvars32_710.bat"  
Setting environment for using Microsoft Visual Studio .NET 2003 tools.
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>cd .  
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>nmake -f xpcosc.mk  ADD_MDL_NAME_TO_GLOBALS=1 EXT_MODE=1 VISUAL_VER=7.1  
 
Microsoft (R) Program Maintenance Utility, Version 8.00.50727.42
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
 
### Compiling xpcosc.c
   cl -Ot  /c /O2 /nologo -DMODEL=xpcosc -DRT -DNUMST=2  -DTID01EQ=1 -DNCSTATES=2  -DMT=0 -DHAVESTDIO -DXPCMSVISUALC  -DXPCCALLCONV=  -DUSE_RTMODEL -DERT_CORE  xpcosc.c
xpcosc.c
### Compiling rt_nonfinite.c
   cl -Ot  /c /O2 /nologo -DMODEL=xpcosc -DRT -DNUMST=2  -DTID01EQ=1 -DNCSTATES=2  -DMT=0 -DHAVESTDIO -DXPCMSVISUALC  -DXPCCALLCONV=  -DUSE_RTMODEL -DERT_CORE  rt_nonfinite.c
rt_nonfinite.c
### Compiling xpcosc_capi.c
   cl -Ot  /c /O2 /nologo -DMODEL=xpcosc -DRT -DNUMST=2  -DTID01EQ=1 -DNCSTATES=2  -DMT=0 -DHAVESTDIO -DXPCMSVISUALC  -DXPCCALLCONV=  -DUSE_RTMODEL -DERT_CORE  xpcosc_capi.c
xpcosc_capi.c
### Compiling xpcosc_data.c
   cl -Ot  /c /O2 /nologo -DMODEL=xpcosc -DRT -DNUMST=2  -DTID01EQ=1 -DNCSTATES=2  -DMT=0 -DHAVESTDIO -DXPCMSVISUALC  -DXPCCALLCONV=  -DUSE_RTMODEL -DERT_CORE  xpcosc_data.c
xpcosc_data.c
### Compiling xpctarget.c
   cl -Ot  /c /O2 /nologo -DMODEL=xpcosc -DRT -DNUMST=2  -DTID01EQ=1 -DNCSTATES=2  -DMT=0 -DHAVESTDIO -DXPCMSVISUALC  -DXPCCALLCONV=  -DUSE_RTMODEL -DERT_CORE  C:\Programme\Matlab71\toolbox\rtw\targets\xpc\target\build\src\xpctarget.c
xpctarget.c
### Linking ...
   C:\Programme\Matlab71\sys\perl\win32\bin\perl C:\Programme\Matlab71\rtw\c\tools\mkvc_lnk.pl xpcosc.lnk xpcosc.obj rt_logging_mmi.obj rt_nonfinite.obj rtw_modelmap_utils.obj xpcosc_capi.obj xpcosc_data.obj xpctarget.obj    
   link /NOLOGO /DLL /SUBSYSTEM:CONSOLE /DEF:xpcvcdll.def  /Include:_malloc C:\Programme\Matlab71\toolbox\rtw\targets\xpc\target\build\lib\rttheap.lib  C:\Programme\Matlab71\rtw\c\lib\win32\rtwlib_vc.lib xpcruntime.lib    @xpcosc.lnk -out:xpcosc.dll
LIBCMT.lib(calloc.obj) : error LNK2005: _calloc ist bereits in rttheap.lib(rttheap.obj) definiert.
LIBCMT.lib(realloc.obj) : error LNK2005: _realloc ist bereits in rttheap.lib(rttheap.obj) definiert.
LIBCMT.lib(heapinit.obj) : error LNK2005: __heap_init ist bereits in rttheap.lib(rttheap.obj) definiert.
LIBCMT.lib(heapinit.obj) : error LNK2005: __heap_term ist bereits in rttheap.lib(rttheap.obj) definiert.
LIBCMT.lib(heapinit.obj) : error LNK2005: __amblksiz ist bereits in rttheap.lib(rttheap.obj) definiert.
   Bibliothek "xpcosc.lib" und Objekt "xpcosc.exp" werden erstellt.
rtw_modelmap_utils.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__assertfail" in Funktion "_rtwCAPI_EncodePath".
xpcosc.dll : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
NMAKE : fatal error U1077: "C:\Programme\Microsoft_Visual_Studio_8\VC\bin\link.EXE": Rückgabe-Code "0x460"
Stop.
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>echo The make command returned an error of 2  
The make command returned an error of 2
 
C:\Programme\MATLAB71\work\xpcosc_xpc_rtw>An_error_occured_during_the_call_to_make
Der Befehl "An_error_occured_during_the_call_to_make" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
 


Gast



Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 30.05.2008, 00:33     Titel:
  Antworten mit Zitat      
Hallo zusammen,

ich habe genau das gleiche Problem. Ich schreibe gerade an meiner Diplomarbeit und muss dazu die realtime engine von Matlab verwenden.
Nach vielen schlaflosen Naechten habe ich den Compiler dazu gebracht das Beispielprogramm xpc_osc3 zu compilieren. Beim Linken erhalte ich aber genau die gleiche Fehlermeldung.
Ich verwende Matlab 7.1 und als Compiler dient MS VS 2005 Professional.

Beste Gruesse von Downunder
Vitus
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.