SpartanJ / SOIL2

SOIL2 is a tiny C library used primarily for uploading textures into OpenGL.
MIT No Attribution
370 stars 75 forks source link

Unable to compile #38

Closed larch13 closed 4 years ago

larch13 commented 4 years ago

I am using visual studio 2019 and whenever I try to compile I get this error coming from some of the SOIL2 files

'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

how can I fix this I tried putting #define _CRT_SECURE_NO_DEPRECATE at the beginning of the offending files but it completely messed everything up. what can I do to fix this?

SpartanJ commented 4 years ago

This is an issue just with your own project configuration. The project generated with premake5 will work just fine. You just needed to add _CRT_SECURE_NO_DEPRECATE in your preprocessors: Untitled Regards