testExe1.c 436 B

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