Gambas France BETA


Pas de compte ? Incription

Les composants ecrits en C

Ce sujet est résolu.

1
AuteurMessages
xave4552#1 Posté le 26/8/2015 à 17:16:27
Bonjour a tous,
Je fait mumuse actuellement avec des video en essayent (un bien grand mot) de faire du traitement d'image en temps réel.
J'ai déjà implanté quelques algorithme simple en plus des fonction qui ce trouve dans gambas (les fonction de base de gambas ne ne fonctionne pas toutes soit dite en passant).
Enfin bref je suis heurté par les perf du langage (même avec le JIT et les thread). 100ms pour un petits algo de rien du tous! Avec une image en 640*480 c'est long.


Je me suis donc mis en tête de créer mon petit composant écrit en C. Je voulais savoir si il existait des tuto pour sa car franchement la doc (ex:how to ???) est un peux décevante... et pourtant j'ai regarder le code source de gambas mais cela reste obscure quelqu'un aurait-il un lien ou quelque chose avec une doc ou un tutos un peux plus explicite.
Ou bien si vous le voulez un petit exemple de rien du tous avec genre une ou deux fonction dans le composant écrit en c, la compilation de la source et enfin la mise en place dans gambas...

Merci d'avance. ++
vuott#2 Posté le 26/8/2015 à 20:35:42
Ne cedere ineluctabili possimusHello xave4552,

excuse me, if I answer to you in english language....

In Gambas the C functions and resources management, stored in external libraries, is generally complex.

You can choose two modes from:
- creating a Component, then you will need to install on your system;
- managing external functions with the key word "Extern" (you will not have to install anything).

Building a Component is the more complex mode, but it offers you the possibility to manage every very complex situation of the external resources, in C written.
About writing a Component for Gambas there is this tutorial:
http://www-e.uni-magdeburg.de/tboege/gambas


If you choose the management with "Extern" and if you'll some particularly complex external resources, you can create something of a hybrid: like managing that is most complex directly with your specific external library, written in C, and the most easily with "Extern" in Gambas.
About using external functions with "Extern" Gambas key-word and shared libraries .so there is enough in italian:
www.gambas-it.org/wiki/index.php?title=Guide_della_comunit%C3%A0#Richiamare_funzioni_esterne_mediante_Extern
particularly:
http://www.gambas-it.org/wiki/index.php?title=Extern:_richiamare_funzioni_esterne_a_Gambas
http://www.gambas-es.org/viewtopic.php?f=1&t=4501 in spanish.
« Vita non suavis esse potest, nec Mors amara. »
xave4552#3 Posté le 26/8/2015 à 21:04:49
Hello vuott,
Thank you for your advice, don't worry i understand English.
I am going to study this links.

I close the toopic if ever I need more help i will reopen one more.

Thank to you, bye.
vuott#4 Posté le 26/8/2015 à 21:16:47
Ne cedere ineluctabili possimusIf you want some help on writing a Component, I suggest you contact Tobias Boege (the autor of tutorial on C Components).
If you want some help on using Extern key-word, I can help you.

bye.
« Vita non suavis esse potest, nec Mors amara. »
1