Pedro Alves wrote: > Please don't top post.
Oops, sorry. I have limited experience posting to mailing lists like this one, so my apologies for poor etiquette. > Ximsce wrote: >> I don't get any int return warnings, the only output from compilation is: >> >> Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import) >> >> which has something to do with multi-threading, I believe. > > OK, this is normal. > > Below is >> almost the exact code that worked yesterday morning (I unfortunately >> don't have an exact copy of the code that worked), before I started to >> complicate things. If I comment out the execv(), everything else works. >> I have tested the lame.exe by itself, and it works, too. I am >> compiling with arm-wince-cegcc-gcc and then copying to Windows Mobile 5. >> >> char *args[3]; >> args[0] = LAME_EXECUTABLE; >> args[1] = TEST_WAV_FILE; >> args[2] = TEST_MP3_OUT; >> >> execv(LAME_EXECUTABLE, args); >> > > You didn't NULL terminate the argument list: > http://www.opengroup.org/onlinepubs/000095399/functions/exec.html > > "The argument argv is an array of character pointers to > null-terminated strings. The application shall ensure that the last > member of this array is a null pointer. These strings shall constitute > the argument list available to the new process image. The value in > argv[0] should point to a filename that is associated with the process > being started by one of the exec functions." > > Try this: > > char *args[4]; > args[0] = LAME_EXECUTABLE; > args[1] = TEST_WAV_FILE; > args[2] = TEST_MP3_OUT; > args[3] = NULL; > > execv(LAME_EXECUTABLE, args); > > Cheers, > Pedro Alves > Right, that was a slight typo on my part. I've added the NULL termination, now the program sort of works. When I run it the first time, the log file gets created, but execution appears to still fail on the execv(). If I run the program a second time, then the execv() appears to run (the file encoded by lame appears), but then the log file is locked and not written too, as well as the exe for my application, and the pop up dialog signaling completion never shows. Needless to say, strange behavior. I am going to try exception handling again, maybe that will turn up something. Thanks, Matt ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel