Question

I am getting "implicit declaration of function 'qsort_s'" warning which means GCC doesn't find it in headers included. I am including:

windows.h
stdlib.h
string.h
search.h (given as requirement in visual studio documentation)

I am somehow unable to google for location of either qsort_s or qsort_r (I've read that they provide the same functionality - allowing to pass context to comparator function).

Anyone knows how to solve it ?

Was it helpful?

Solution

In my copy of mingw-w64 (recent trunk) it isn't defined at all. The mingw folks must have missed it. It is defined in msvcr90.def and later so, so it is in the import libraries...

I suggest you file an upstream bug, define it yourself in the meantime (get the definition from MSDN) and link accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top