none
unresolved external symbol _strncasecmp.

    Question

  • Hi,all, this is a green hand.

    I'm compiling something in vc++6.0.

     I should say that the source codes are written for gcc, I just wanna edit it so that it can run in vc++6.0. The progress can run well in linux, and my OS is windows.

     Now the compiling progress is OK, but I met problems like this in the linking progress:


    rdseed.obj : error LNK2001: unresolved external symbol _strncasecmp.


    is there anyone who can tell me how to deal with this? Thanks.

    Tuesday, December 25, 2007 2:16 PM

Answers

All replies


  • And instead of using Linux Function Simply try Windows API .Have a look on the following link to undestand the things in detail.

    Linker Tools Error LNK2001

    Thanx
    Tuesday, December 25, 2007 3:51 PM
  •  

    Pintu Shukla , thanks for you help. I'm doing with that now.
    Wednesday, December 26, 2007 1:43 AM
  • I used stricmp and strnicmp, instead of strcasecmp and strncasecmp, and included the head file string.h, and the problem is olved now. Thanx.

     

    Friday, December 28, 2007 4:44 AM
  • "And instead of using Linux Function Simply try Windows API"

    Silly him, Having the odacity to try to use obscure International Standard, like Posix. What next a C99-compliant compiler ?

    @echoooo: Create a header to hide windows ugliness. something like winshit.h:

    #ifndef WINSHIT_INCLUDED
    #define WINSHIT_INCLUDED

    #if defined(WIN32) || defined(WIN64)
    #define strcasecmp _stricmp
    #endif /* Def WIN32 or Def WIN64 */

    #endif /* Ndef WINSHIT_INCLUDED */

    Over time you will put there many wrapper and inline funciton to hide the big intentional mess created by Redmont.


    Monday, August 4, 2008 10:31 PM
  • Yes, god forbid he use an ISO function rather than a POSIX function on a non-POSIX operating system.
    Monday, August 4, 2008 10:40 PM