bonjour,
j'ai un petit probleme : j'essaie dans un code C++ d'integrer un outil de maillage qui se lance en ligne de commandes, avec un certain nombre d'arguments. J'utilise donc _execv ou _execvp fournies dans Process.h.
Le chemin vers l'executable du mailleur est dans le path de windows. Voici comment je definis les arguments et comment je lance le mailleur :
char *arguments[8];
char buffer[30];
arguments[0] = "C:\devel\bamg\Debug\bamg";
arguments[1] = "-g";
arguments[2] = GeometryFileName.GetBuffer();
arguments[3] = "-o";
arguments[4] = MeshFileName.GetBuffer();
arguments[5] = "-thetaquad";
sprintf(&(buffer[0]), "%f", angle);
arguments[6] = &(buffer[0]);
arguments[7] = "-2q";
//Appel systeme
i = _execv(arguments[0], arguments);
bidule = errno;
errno indique 22 comme code d'erreur , soit une erreur d'argument. or tous mes arguments sont censes etre bons , j'ai teste cette ligne de commande en dehors de ce contexte.
De plus lorsque je vire le chemin complet vers l'executable j'ai une erreur mémoire qui se produit, alors qu'avec mon path, ca devrait etre bon.
Ou puis je avoir faitune erreur
passke la, je vois pas