Sign in to follow this  

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

This topic is 3096 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
#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

This topic is 3096 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this