Skip to content

getenv error in "default_num_threads.cpp" #1743

@xarthurx

Description

@xarthurx

Describe your issue

When compiling a project with libigl in Visual Studio 2019 (info below)
image

I got this error:

Error C4996 '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. igl_cppPort C:\Libraries\libigl\include\igl\default_num_threads.cpp	33	

Some reference:
https://stackoverflow.com/questions/48568707/getenv-function-may-be-unsafe-really
https://stackoverflow.com/questions/15916695/can-anyone-give-me-example-code-of-dupenv-s

Checklist

  • I have read the bug report
  • CMake issue: I have tried with a fresh clone/empty build directory

Platform

  • Windows
  • macOS
  • Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions