9/10 Stupid question: how do I reference a C callback?
int mycompare(void const *a, void const *b) { ... }
qsort(msg, sizeof(Msg), numMsgs, mycompare);
I get
"Type error in argument 4 to `qsort'; calling convention mismatch."
\_ There's nothing wrong in the you reference it. However, you should
make the mycompare() prototype match exactly with what qsort() wants
in its prototype. Exactly what it wants depends on your machine
and your compiler. Check the .h file that you're including.
\_ Yeah, I just realized that it compiles w/ gcc... I have some
problems, apparently. --op |