vs2012 error c4996: This function or variable may be unsafe
更新時間:2015年04月22日 09:03:55 投稿:junjie
這篇文章主要介紹了vs2012 error c4996: This function or variable may be unsafe,需要的朋友可以參考下
編譯lua源碼時,使用vs2012,遇到如下錯誤。
復(fù)制代碼 代碼如下:
1>------ 已啟動生成: 項(xiàng)目: 20130925, 配置: Debug Win32 ------
1> stdafx.cpp
1>d:\code\20130925\20130925\stdafx.cpp(18): error C4996: '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.
1> d:\vs2012\vc\include\stdio.h(218) : 參見“fopen”的聲明
1> 20130925.cpp
1> 正在生成代碼...
========== 生成: 成功 0 個,失敗 1 個,最新 0 個,跳過 0 個 ==========
解決方案,項(xiàng)目 ->屬性 -> c/c++ -> 預(yù)處理器 -> 點(diǎn)擊預(yù)處理器定義,編輯,加入_CRT_SECURE_NO_WARNINGS,即可。
相關(guān)文章
Lua中的函數(shù)相關(guān)知識點(diǎn)整理匯總
這篇文章主要介紹了Lua中的函數(shù)相關(guān)知識點(diǎn)整理匯總,包括函數(shù)的參數(shù)傳遞和定義函數(shù)等基本知識,需要的朋友可以參考下2015-05-05
使用lua實(shí)現(xiàn)php的var_dump()函數(shù)功能
小編比較熟悉php,所以這篇文章主要介紹了使用lua實(shí)現(xiàn)php的var_dump()函數(shù)功能,需要的朋友可以參考下2014-11-11
Lua 操作 MongoDB 數(shù)據(jù)庫實(shí)例
這篇文章主要介紹了Lua 操作 MongoDB 數(shù)據(jù)庫實(shí)例,本文給出了修改后的lua-mongo API和具體的操作MongoDB 數(shù)據(jù)庫代碼,需要的朋友可以參考下2015-03-03

