DBD-Pg - _strcasecmp unresolved reference when compiling 1.43

Posted on Tue Aug 16 17:13:30 2005 by akgreen
_strcasecmp unresolved reference when compiling 1.43
When compiling the 1.43 package on a win32 system with VC6.0, I got a fatal link error due to the unresolved reference for the strcasecmp function used by dbimp.c. I could not find a definition of the strcasecmp function in any library I have or on the web. There may be better ways of solving this problem, but I got around it by adding the following statement to dbdimp.h: #define strcasecmp(A,B) strcmp(_strupr(A),B) This code may have unwanted consequences in that the _strupr function converts the string A to an uppercase string in place, but so far all my tests and applications have not been adversely affected. Improvements on this approach will be welcome.
Write a response