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
error C4996: 'strncpy' unsafe #122
Comments
Thanks for bringing that up, that's a thing I should fix asap. |
Since I don't want to rush you to create a fixed release, is there a simple way I can fix the generated glad.c file myself? |
I also meet this bug, |
Workaround is defining: #define _CRT_SECURE_NO_WARNINGS before including glad. I will release an updated version within a few hours. |
Cool, thank you very much! I'll try later today. Sorry if asking for a workaround seemed stupid, I'm super new to C++ and just following a tutorial on OpenGL right now. Thank you for your amazing generator, quick support and help! :) ~ Incendor |
Should be fixed in master, can you confirm that for me? Try generating glad from here: http://cglad.dav1d.de/ (note that is not yet live and a different subdomain). Thanks! |
Worked great! :) Now I'm getting a LINK error but I don't think that has to do with glad. |
Thanks again, I finally managed to setup a project in VC++ - works also on my end :) Changes pushed to the main website - Will push a new version after fixing the (void) bug in #119. |
Hi!
Today I generated a glad.c file and includes for C++ and OpenGL 4.4 using your webservice.
When I tried to include it in my C++ Project (#include as well as adding the glad.c file to my project) and building that, I got the following two errors:
e:\files\opengl\glad.c(173): error C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt\string.h(343): note: see declaration of 'strncpy'
I tried reinstalling this exact windows kit but that didn't help.
Is there any way I can solve this problem? Or did i make a mistake when generating the files / integrating them into my project?
~ Incendor
The text was updated successfully, but these errors were encountered: