Jump to content
  • Advertisement
Sign in to follow this  
Mad_Coder

wxWidget C3861: 'strdup': identifier not found, even with argument-dependent lookup

This topic is 3310 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA); error C3861: 'strdup': identifier not found, even with argument-dependent lookup Why can't it find strdup, when in wxchar.h: #define wxStrdupA _strdup? Why does it say it can't find strdup in lieu of _strdup which is in the #define?

Share this post


Link to post
Share on other sites
Advertisement
#if defined(__VISUALC__) && __VISUALC__ >= 1400
#define wxStrdupA _strdup
#elif !(defined(__MWERKS__) && defined(__WXMAC__)) && !defined(__WXWINCE__)
/* use #define, not inline wrapper, as it is tested with #ifndef below */
#define wxStrdupA strdup
#endif


1) What compiler are you using? If you're using anything other than the Visual Studio, that explains why it's looking for strdup over _strdup
2) Are you #include-ing <cstring> / <string.h> ? Probably not -- no wonder it can't find the identifier, that's where it's defined ;-).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!