编译lua源码时,使用vs2012,遇到如下错误。

1>------ 已启动生成: 项目: 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 个 ==========

解决方案,项目 ->属性 -> c/c++ -> 预处理器 -> 点击预处理器定义,编辑,加入_CRT_SECURE_NO_WARNINGS,即可。

vs2012 error c4996: This function or variable may be unsafe的更多相关文章

  1. [转] This function or variable may be unsafe

    原文:This function or variable may be unsafe,他大姨妈 错误提示: [Error]'fopen' This function or variable may b ...

  2. vs2012 error c4996: 'fopen': This function or variable may be unsafe

    1>------ 已启动生成: 项目: 20130925, 配置: Debug Win32 ------1>  stdafx.cpp1>d:\code\20130925\201309 ...

  3. 配置OpenCV产生flann\logger.h(66): error C4996: 'fopen': This function or variable may be unsafe问题[zz]

    使用vs2012/2013配置opencv编译出现问题: 1>------ 已启动生成: 项目: Win32ForOpenCV245, 配置: Debug Win32 ------ 1> ...

  4. error C4996: 'strcpy': This function or variable may be unsafe.

    vs2012用strcpy遇到的错误. 错误描述:error C4996: 'strcpy': This function or variable may be unsafe. Consider us ...

  5. error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead解决方案

    vs2012使用c语言函数fopen操作文件时报错: 错误 1 error C4996: 'fopen': This function or variable may be unsafe. Consi ...

  6. error C4996: 'fopen': This function or variable may be unsafe.

    vs2013中错误提示信息: error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s ...

  7. VS 编译错误【error C4996: 'scanf': This function or variable may be unsafe. 】的解决方案

    在VS中编译 C 语言项目,如果使用了 scanf 函数,编译时便会提示如下错误: error C4996: 'scanf': This function or variable may be uns ...

  8. error C4996: 'sprintf': This function or variable may be unsafe.

    error C4996: 'sprintf': This function or variable may be unsafe.   error C4996: 'sprintf': This func ...

  9. Visual Studio 2012 编译错误【error C4996: 'scanf': This function or variable may be unsafe. 】的解决方案

    在VS 2012 中编译 C 语言项目,如果使用了 scanf 函数,编译时便会提示如下错误: error C4996: 'scanf': This function or variable may ...

随机推荐

  1. linux 无交互添加用户设置密码

    #!/bin/bash useradd -m test echo " | passwd --stdin test

  2. 在myeclipse下安装svn的几种方式

    方法一:在线安装 1.打开HELP->MyEclipse Configuration Center.切换到SoftWare标签页. 2.点击Add Site 打开对话框,在对话框Name输入Sv ...

  3. 《简明python教程》笔记二

    面向对象的编程: 类和对象是面向对象编程的两个主要方面.类创建一个新类型,而对象是这个类的实例.对象可以使用普通的属于对象的变量存储数据.属于一个对象或类的变量被称为域.对象也可以使用属于类的函数来具 ...

  4. Cocos2d-x 核心概念 - 场景(Scene)

    场景(Scene):构成游戏的界面 场景类的几种: 展示类场景 选项类场景 游戏场景 场景类继承自Node类

  5. 用Excel制作热图(heatmap)的方法

    http://jingyan.baidu.com/article/64d05a0240ec75de55f73bd8.html 利用Excel 2010及以上版本的"条件格式"--& ...

  6. Django + mysql 快速搭建简单web投票系统

    了解学习pyhton web的简单demo 1. 安装Django, 安装pyhton 自行百度 2. 执行命令创建project  django-admin.py startproject mysi ...

  7. redhat samba匿名登录服务器搭建

    smb服务器只需要yum install samba 安装起,并修改配置文件就可以匿名使用了.   smb配置文件,这里允许匿名登录.红色部分代表我共享出来文件夹参数code [root@localh ...

  8. java:同步和死锁

    多个线程共享一个资源的时候需要进行同步(否则会出现错误:如负数,重复数),但是过多的同步会造成死锁. synchronized(this) { } 非同步情况: public class SyncTh ...

  9. [经验] Win7减肥攻略(删文件不删功能、简化优化系统不简优化性能)

    [经验] Win7减肥攻略(删文件不删功能.简化优化系统不简优化性能) ☆心梦无痕☆ 发表于 2014-1-24 11:15:04 https://www.itsk.com/thread-316471 ...

  10. <js>实现回车键登陆方法,并处理谷歌与火狐不兼容的问题

    1.在body中添加onkeydown事件 <body onkeydown="keyLogin(event);">2.使用js相应登陆添加方法//添加回车登陆事件 fu ...