Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. my $info = qx(primercheck.hpp);
  2. print "primercheck.hpp is: $infon";
  3.  
  4. # make a temp copy with cpp extension
  5. system("cp primercheck.hpp primercheck.cpp");
  6.  
  7. # generate executable using gcc
  8. system("gcc -o primercheck primercheck.cpp");
  9.  
  10. # set execute permissions on resulting file
  11. system("chmod +x primercheck");
  12.  
  13. # call the executable
  14. system("./primercheck");
  15.  
  16. # remove the temp cpp file
  17. system("rm primercheck.cpp");
  18.  
  19. # optional - remove the executable file as well
  20. system("rm primercheck");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement