codeblock 编译googletest
1、cmake安装
2、codeblock 16.01
4、PATH路径添加(重启电脑,保证设置的PATH路径生效)
5、python安装
6、编译安装: http://www.cnblogs.com/TenosDoIt/p/3412721.html
错误:
||=== Build: Debug in d (compiler: GNU GCC Compiler) ===|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h||In function 'int testing::internal::posix::StrCaseCmp(const char*, const char*)':|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h|1719|error: '_stricmp' was not declared in this scope|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h||In function 'char* testing::internal::posix::StrDup(const char*)':|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h|1721|error: '_strdup' was not declared in this scope|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h||In function 'int testing::internal::posix::FileNo(FILE*)':|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h|1729|error: '_fileno' was not declared in this scope|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h||In function 'FILE* testing::internal::posix::FDOpen(int, const char*)':|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h|1779|error: 'fdopen' was not declared in this scope|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
解决: 在codeblocks上的build-options上去除-std=C++11 ,添加-std=gnu++
错误:
||=== Build: all in gtest (compiler: GNU GCC Compiler) ===|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h||In function 'void testing::internal::SleepMilliseconds(int)':|
D:\source\googletest-release-1.7.0\include\gtest\internal\gtest-port.h|1193|error: 'nanosleep' was not declared in this scope|
D:\source\googletest-release-1.7.0\src\gtest-death-test.cc|123|warning: 'testing::internal::g_in_fast_death_test_child' defined but not used [-Wunused-variable]|
CMakeFiles\gtest.dir\build.make|62|recipe for target 'CMakeFiles/gtest.dir/src/gtest-all.cc.obj' failed|
CMakeFiles\Makefile2|66|recipe for target 'CMakeFiles/gtest.dir/all' failed|
D:\source\googletest-release-1.7.0\codeblocks-mingw\Makefile|82|recipe for target 'all' failed|
||=== Build failed: 4 error(s), 1 warning(s) (0 minute(s), 1 second(s)) ===|
解决:注释 nanosleep 这一行
编译Google Test 1.8.0,出现很多编译错误,有可能是Mingw版本过老
codeblock 编译googletest的更多相关文章
- codeblock编译Object-C
http://blog.csdn.net/ldl22847/article/details/7482971 http://www.cnblogs.com/qingyuan/p/3524791.html ...
- 直接在CMake项目中编译GoogleTest和GoogleMock作为项目的一部分
直接在CMake项目中编译GoogleTest和GoogleMock作为项目的一部分 本文是关于如何将GoogleTest和GoogleMock在没有预先编译安装在机器的情况下,直接在项目中作为项目的 ...
- Linux c codeblock的使用(二):在工程中编译多个文件
(一)前言 我们刚开始学习linux c的时候,一般都是在一个c文件里面写完所有程序,然后用gcc编译这个c文件就好了,十分简单. 但是你有没有想过,如果我们希望将不同模块的代码放到不同的c文件,然后 ...
- 如何用googletest写单元测试
http://www.uml.org.cn/c++/201203293.asp googletest是一个用来写C++单元测试的框架,它是跨平台的,可应用在windows.linux.Mac等OS平台 ...
- 解决codeblock不能运行的问题
codeblock 编译失败 软件 IDE codeblock这软件的确不错,但是除此安装使用就会不小心入坑.你是不是满心欢喜的下载好codeblock,敲入代码,点击运行的时候却总是没反应呢? 如果 ...
- Linux c codeblock的使用(三):使用函数库
(一)概念 什么是函数库呢?一下子说概念大家可能不太熟悉,但是这实际上是大家在windows系统上经常见到的东西.没错,就是那些后缀为DLL的文件. linux上实际也有自己的函数库文件,文件类型为. ...
- 使用googletest进行C++单元测试(Netbeans为例)
googletest设置步骤(Netbeans为例) 下载googletest [https://github.com/google/googletest],解压到<gtest_dir> ...
- MinGW下编译openssl, json-c
目的:在windows环境下,编译开源库openssl 环境:windows 10 ,Mingw及自带msys工具,openssl-1.0.2j 工具主要使用MinGW(含msys1.0), IDE选 ...
- JAVA的String的传值和传地址问题
关于Java的String类型,可能你会碰到这种情况,将String类型的变量传到一个函数,在这个函数中修改变量的值,但是,实参的值并没有发生改变. Java中String的传值/传地址问题: 例子引 ...
随机推荐
- POJ2001Shortest Prefixes[Trie]
Shortest Prefixes Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 17683 Accepted: 768 ...
- UNITY 之FixedUpdate
这个机制的加入 比 AS3好了很多 AS3的EnterFrame相当于UNITY的Update 但是FLASH做不了也是因为浏览器的限制吧! Here's how the fixed time ste ...
- C#.NET 大型企业信息化系统集成快速开发平台 4.2 版本 - 适合大型企业信息化应用使用的角色权限管理体系
每个人外表看看都没什么大区别.但是内在的知识.处理问题的能力.解决问题的能力.头脑灵活性都会有很大的差距.软件组件也是一样,有些组件编写厉害,想问题深入,能处理的难题也多,构思巧妙. 通用快速开发平台 ...
- JSP基础学习
JQuery教程: http://www.w3school.com.cn/jquery/ HTTP协议的 http://www.w3.org/Protocols/rfc2616/rfc2616.htm ...
- 跟我从零基础学习Unity3D开发--NGUI入门基础
英雄联盟(撸啊撸) QQ飞车 魔兽世界等等相信大家都玩过游戏吧,玩过那UI知道是什么吧?UI可能说得有点专业的话那么游戏中那些属性面板例如: 现在对UI有一定认识了吧!回想一下您玩过的游戏就一定知道什 ...
- docfx组件介绍--YamlSerialization
在docfx中把元数据以yaml的形式保存,在metadata阶段会序列化数据到yaml文件中,在build阶段又需要从yaml文件反序列化出来.在使用过程中,意外发现yamldotnet在处理大量强 ...
- windows下编译chromium浏览器的15个流程整理
编译chromium 系统为windows, 国内在windows上编译chromium的资料比较少, 我这篇文章只能作为参考, 记录我遇到的一些问题,因为chromium团队也会修改了代码,或者编译 ...
- 教你一招:解决windows xp系统开机出现“disk checking has been canceled”
问题重现: 问题分析: 系统的注册表被修改了. 问题解决: 1.(临时解决)开机时,按ESC或ENTER键取消. 2.(彻底解决)修改注册表文件. Win + R 打开运行 Regedit ,进入注册 ...
- 用Python制作新浪微博爬虫
早上刷空间发现最近好多人过生日诶~ 仔细想想,好像4月份的时候也是特别多人过生日[比如我 那么每个人生日的月份有什么分布规律呢...突然想写个小程序统计一下 最简单易得的生日数据库大概就是新浪微博了: ...
- Bzoj3144 [Hnoi2013]切糕
Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 1494 Solved: 818 Description Input 第一行是三个正整数P,Q,R,表 ...