testExe3.c 393 B

1234567891011121314151617181920
  1. #include <stdio.h>
  2. int main(int argc, const char* argv[])
  3. {
  4. if (argc < 2) {
  5. fprintf(stderr, "Must specify output file.\n");
  6. return 1;
  7. }
  8. {
  9. FILE* f = fopen(argv[1], "w");
  10. if (f) {
  11. fprintf(f, "int generated_by_testExe3() { return 0; }\n");
  12. fclose(f);
  13. } else {
  14. fprintf(stderr, "Error writing to %s\n", argv[1]);
  15. return 1;
  16. }
  17. }
  18. return 0;
  19. }