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

mex Files um c Funktionen aus Matlab zu nutzen

 

baronsocke
Forum-Anfänger

Forum-Anfänger


Beiträge: 15
Anmeldedatum: 21.05.14
Wohnort: Köln
Version: ---
     Beitrag Verfasst am: 13.06.2014, 15:30     Titel: mex Files um c Funktionen aus Matlab zu nutzen
  Antworten mit Zitat      
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?
Private Nachricht senden Benutzer-Profile anzeigen


baronsocke
Themenstarter

Forum-Anfänger

Forum-Anfänger


Beiträge: 15
Anmeldedatum: 21.05.14
Wohnort: Köln
Version: ---
     Beitrag Verfasst am: 13.06.2014, 17:04     Titel:
  Antworten mit Zitat      
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
Private Nachricht senden Benutzer-Profile anzeigen
 
markuman
Forum-Guru

Forum-Guru


Beiträge: 320
Anmeldedatum: 14.12.12
Wohnort: ---
Version: 2013a/2013b, Octave 3.6.4, 3.7.7
     Beitrag Verfasst am: 13.06.2014, 18:31     Titel:
  Antworten mit Zitat      
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 Cool

entropie=char(floor(94*rand(1, round(100.*rand)) + 32))
https://github.com/markuman
Private Nachricht senden Benutzer-Profile anzeigen
 
baronsocke
Themenstarter

Forum-Anfänger

Forum-Anfänger


Beiträge: 15
Anmeldedatum: 21.05.14
Wohnort: Köln
Version: ---
     Beitrag Verfasst am: 13.06.2014, 18:39     Titel:
  Antworten mit Zitat      
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?
Private Nachricht senden Benutzer-Profile anzeigen
 
markuman
Forum-Guru

Forum-Guru


Beiträge: 320
Anmeldedatum: 14.12.12
Wohnort: ---
Version: 2013a/2013b, Octave 3.6.4, 3.7.7
     Beitrag Verfasst am: 13.06.2014, 19:43     Titel:
  Antworten mit Zitat      
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 Cool

entropie=char(floor(94*rand(1, round(100.*rand)) + 32))
https://github.com/markuman
Private Nachricht senden Benutzer-Profile anzeigen
 
baronsocke
Themenstarter

Forum-Anfänger

Forum-Anfänger


Beiträge: 15
Anmeldedatum: 21.05.14
Wohnort: Köln
Version: ---
     Beitrag Verfasst am: 17.06.2014, 12:45     Titel:
  Antworten mit Zitat      
Okay, das werde ich machen. Hat dennoch sonst irgendwer eine Idee?
Private Nachricht senden Benutzer-Profile anzeigen
 
Jan S
Moderator

Moderator


Beiträge: 11.057
Anmeldedatum: 08.07.10
Wohnort: Heidelberg
Version: 2009a, 2016b
     Beitrag Verfasst am: 17.06.2014, 22:46     Titel:
  Antworten mit Zitat      
Hallo baronsocke,

Bevor ich anfange zu raten, poste doch nochmal den aktuellen Code und die zeile 54 von RodeonControl.h .

Gruß, Jan
Private Nachricht senden Benutzer-Profile anzeigen
 
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 - 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.