Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

getenv deprecated #1708

Open
Open
Assignees
Milestone
@hollasch

Description

Discussed in #1699

Originally posted by ozu95supein April 20, 2025
I was following the book of Raytracing in one Week. Whenever I am at the point of trying to implement stb image to read in the earth texture, I keep getting the error C4996 on Visual Studio 2022 Windows. It says getenv is deprecated:

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

I've tried to use the define _CRT_SECURE_NO_WARNINGS. to see if I could ignore it, but it still gives me the same error. How do I solve this?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /