Tu ne confonds pas avec const
Tu ne confonds pas avec const
Oui en effet. Apres verification static est bien ce dont j´ai besoin. Donc le probleme de savoir ou je declare mes variables est resolu. Mais j´ai un probleme avec cette structure.
Lorsque je la met au debut de la boucle why=0, pas de probleme je peux executer la boucle why=0 sans probleme mais le probleme vient quand je rentre dans la boucle why =1. Des que je rentre dans la boucle why=1, avec les variables static ca marche mais des des que j´utilise une fonction dans la boucle why=1 qui est dans ma bibliotheque cree avec matlab j´ai une error par rapport a libmx.dll (je tiens a preciser que j´utilise aussi des fonctions de ma librarie dans la boucle why=0 sans probleme). Donc je ne sais pas trop comment faire avec cette structure.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 if(!mclInitializeApplication(NULL,0) ) { std::cout<<"Could not initialize the library."<<std::endl; return -2; } if(!libfinalInitialize()) { std::cout<<"Could not initialize the library."<<std::endl; return -2; }
ci dessous quelaues infos sur la structure:
You must call mclInitializeApplication once at the beginning of your driver application. You must make this call before calling any other MathWorks functions. This also applies to shared libraries. Avoid calling mclInitializeApplication multiple times in an application as it will cause the application to hang.
After you call mclTerminateApplication, you may not call mclInitializeApplication again. No MathWorks functions may be called after mclTerminateApplication.
Function Signatures
The function signatures are
bool mclInitializeApplication(const char **options, int count);
bool mclTerminateApplication(void);
mclInitializeApplication. Takes an array of strings of user-settable options (these are the very same options that can be provided to mcc via the -R option) and a count of the number of options (the length of the option array). Returns true for success and false for failure.
mclTerminateApplication. Takes no arguments and can only be called after all MCR instances have been destroyed. Returns true for success and false for failure.
#
Initialize the MATLAB libraries by calling the mclInitializeApplication API function. You must call this function once per application, and it must be called before calling any other MATLAB API functions, such as C-Mex functions or C MAT-file functions. mclInitializeApplication must be called before calling any functions in a MATLAB Compiler generated shared library. You may optionally pass in application-level options to this function. mclInitializeApplication returns a Boolean status code. A return value of true indicates successful initialization, and false indicates failure.
#
For each MATLAB Compiler generated shared library that you include in your application, call the library's initialization function. This function performs several library-local initializations, such as unpacking the CTF archive, and starting an MCR instance with the necessary information to execute the code in that archive. The library initialization function will be named libnameInitialize(), where libname is the library's name that was passed in on the command line when the library was compiled. This function returns a Boolean status code. A return value of true indicates successful initialization, and false indicates failure.
Nan j´ai di une betise, ca marche. il faut juste que je vois pour les return plus en detail. Merci pour votre aide.
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager