Search code examples
c++cvisual-studiolinkerbsearch

bsearch and Visual Studio 2008


I'm using a regexp library that calls the standard function bsearch(). When using VS2008, I must include an extra header for this function to be declared (<search.h>).

But when I'm linking, it says that bsearch can't be resolved. The MSDN page (https://msdn.microsoft.com/en-us/library/w0k41tbs%28v=vs.90%29.aspx) doesn't indicate any .lib to add for the linking, so I don't know what to do !

I'm compiling for Windows CE (yeah that still exists).


Solution

  • Other folks ran into the issue on comp.lang.c some time ago, and the consensus was the function is not supported in the CE VS package.

    You'll have to roll your own implementation, which shouldn't be too difficult. Wikipedia is a good starting point.