Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strdup() in Visual Studio 2015 #5

Open
braddabug opened this issue Apr 19, 2017 · 2 comments
Open

strdup() in Visual Studio 2015 #5

braddabug opened this issue Apr 19, 2017 · 2 comments

Comments

@braddabug
Copy link

When I build noc_file_dialog with Visual Studio 2015 I get a compiler error about strdup() on line 181:

"The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup."

If I change strdup() to _strdup() it compiles fine.

@guillaumechereau
Copy link
Owner

Thanks for the info. I think the proper fix would be to add something like:

#ifdef _MSC_VER
    #define strdup _strdup
#endif

@tom-seddon
Copy link

#define _CRT_NONSTDC_NO_DEPRECATE will get rid of the deprecation warnings too.

--Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants