|
|
mex Files um c Funktionen aus Matlab zu nutzen |
|
baronsocke |

Forum-Anfänger
|
 |
Beiträge: 15
|
 |
|
 |
Anmeldedatum: 21.05.14
|
 |
|
 |
Wohnort: Köln
|
 |
|
 |
Version: ---
|
 |
|
|
 |
|
Verfasst am: 13.06.2014, 15:30
Titel: mex Files um c Funktionen aus Matlab zu nutzen
|
 |
Ich habe einen Panorama-Schwenkkopf von RODEON. Auf dieses kommt eine Kamera, so dass ich die Winkel verstellen kann.
Den RODEON Head muss ich aus Matlab steuern. Dafür brauche ich ein mex-File.
Um den RODEON Panoramakopf anzusteuern liegt die gesamte API, C-Code, dll, lib usw. bereit. Diese wird von Rodeon mitgeliefert.
Ich kenne mich leider jedoch nicht so gut damit aus, beschäftige mich die ganze Zeit damit, aber ich steige da nicht wirklich hinter, wie ich was machen muss.
Wie muss ich vorgehen? Welche Files brauche ich? Was muss ich Matlab sagen, damit er darauf zugreifen kann?
Kann irgendwer netterweise Starthilfe geben?
|
|
|
|
|
baronsocke |
Themenstarter

Forum-Anfänger
|
 |
Beiträge: 15
|
 |
|
 |
Anmeldedatum: 21.05.14
|
 |
|
 |
Wohnort: Köln
|
 |
|
 |
Version: ---
|
 |
|
|
 |
|
Verfasst am: 13.06.2014, 17:04
Titel:
|
 |
Ich bekomme schon ne Fehlermeldung, wenn ich das Grundgerüst des Mex-Files compiliere:
#include "mex.h"
#include "windows.h"
#include #TCHAR.h"
#define RODEON_CONTROL_IMPORT_DYNAMIC
#include "Rodeon.Control.h"
RODEON_CONTROL_IMPORT
void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
mexprintf("Dies ist ein Test, ob der Rechner überhaupt compiliert");
return;
}
Fehlermeldung:
lcc preprocessor error: rodeonSteuerung.c:6 Could not find include file <Rodeon.Control.h>
lcc preprocessor warning: rodeonSteuerung.c:14 No newline at end of file
Zuletzt bearbeitet von baronsocke am 13.06.2014, 18:40, insgesamt einmal bearbeitet
|
|
|
markuman |

Forum-Guru
|
 |
Beiträge: 320
|
 |
|
 |
Anmeldedatum: 14.12.12
|
 |
|
 |
Wohnort: ---
|
 |
|
 |
Version: 2013a/2013b, Octave 3.6.4, 3.7.7
|
 |
|
|
 |
|
Verfasst am: 13.06.2014, 18:31
Titel:
|
 |
Na, steht doch da: "Could not find include file <Rodeon.Control.h> "
Gib mal den absoluten Pfad zur Rodeon.Control.h ein.
Also #include "C:\wo\auch\immerRodeon.Control.h"
_________________
DIY OR DIE
entropie=char(floor(94*rand(1, round(100.*rand)) + 32))
https://github.com/markuman
|
|
|
baronsocke |
Themenstarter

Forum-Anfänger
|
 |
Beiträge: 15
|
 |
|
 |
Anmeldedatum: 21.05.14
|
 |
|
 |
Wohnort: Köln
|
 |
|
 |
Version: ---
|
 |
|
|
 |
|
Verfasst am: 13.06.2014, 18:39
Titel:
|
 |
|
 |
|
Habe ich gemacht. Jetzt kommt leider der Mist:
Das verstehe ich nicht. Scheinbar meckert der am Header? Das ist aber eine Header Datei, die ich vom Hersteller habe. Ganz offiziell.
>> mex rodeonSteuerung.c
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 54 syntax error; found `*' expecting `)'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 54 skipping `*' `,' `...'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 127 missing parameter type
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 127 syntax error; found `*' expecting `)'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 127 skipping `*' `*'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 141 missing parameter type
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 141 syntax error; found `*' expecting `)'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 141 skipping `*' `*' `,' `__dyn_tprintf'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 158 missing parameter type
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 158 syntax error; found `*' expecting `)'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 158 skipping `*' `*'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 229 missing parameter type
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 229 missing parameter type
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 229 illegal return type `int function(pointer to void,int)'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 410 missing parameter type
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 410 syntax error; found `*' expecting `)'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 410 skipping `*'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 423 missing parameter type
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 423 syntax error; found `*' expecting `)'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 423 skipping `*'
Error rodeonSteuerung.c: C:\Program Files (x86)\MATLAB\R2010b\extern\include\RodeonControl.h: 436 too many errors
C:\PROGRA~2\MATLAB\R2010B\BIN\MEX.PL: Error: Compile of 'rodeonSteuerung.c' failed.
??? Error using ==> mex at 208
Unable to complete successfully.
Was hat das zu bedeuten?
|
|
|
markuman |

Forum-Guru
|
 |
Beiträge: 320
|
 |
|
 |
Anmeldedatum: 14.12.12
|
 |
|
 |
Wohnort: ---
|
 |
|
 |
Version: 2013a/2013b, Octave 3.6.4, 3.7.7
|
 |
|
|
 |
|
Verfasst am: 13.06.2014, 19:43
Titel:
|
 |
K.a., jedenfalls kann der mex Prozess (LCC compiler) den Rodeon kram nicht kompilieren. Wenn du für beides (Matlab und Rodeon) Geld bezahlt hast, wende dich an den jeweiligen support.
_________________
DIY OR DIE
entropie=char(floor(94*rand(1, round(100.*rand)) + 32))
https://github.com/markuman
|
|
|
baronsocke |
Themenstarter

Forum-Anfänger
|
 |
Beiträge: 15
|
 |
|
 |
Anmeldedatum: 21.05.14
|
 |
|
 |
Wohnort: Köln
|
 |
|
 |
Version: ---
|
 |
|
|
 |
|
Verfasst am: 17.06.2014, 12:45
Titel:
|
 |
Okay, das werde ich machen. Hat dennoch sonst irgendwer eine Idee?
|
|
|
Jan S |

Moderator
|
 |
Beiträge: 11.057
|
 |
|
 |
Anmeldedatum: 08.07.10
|
 |
|
 |
Wohnort: Heidelberg
|
 |
|
 |
Version: 2009a, 2016b
|
 |
|
|
 |
|
Verfasst am: 17.06.2014, 22:46
Titel:
|
 |
Hallo baronsocke,
Bevor ich anfange zu raten, poste doch nochmal den aktuellen Code und die zeile 54 von RodeonControl.h .
Gruß, Jan
|
|
|
|
|
Einstellungen und Berechtigungen
|
|
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
| RSS
Hosted by:
Copyright © 2007 - 2025
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.
|
|