testExe1.c 438 B

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