I’ve been using the UVa Online Judge to solve some programming challenges, and, when submitting my solutions, I’m told the judge will compile my code using the following parameters to GCC/G++ that I don’t know: -lm -lcrypt -pipe -DONLINE_JUDGE.
What do they do? Thank you very much in advance!
“-lm -lcrypt” specifies to link with the math and cryptography libraries – useful if you’re going to use the functions defined in math.h and crypt.h. “-pipe” just means it won’t create intermediate files but will use pipes instead.
"-DONLINE_JUDGE"defines a macro called “ONLINE_JUDGE“, just as if you’d put a “#define” in your code. I guess that’s so you can put something specific to the judging in your code in an “#ifdef”/”#endif” block.