在linux服务器(u2)上编译警告long-long
compiling on linux server (u2) warning long long
当我在eclipse(3.8)上编译时,我没有任何警告和错误,但在服务器"u2"上编译时屏幕上会出现以下警告:
In file included from gtest-all.cc:39:
gtest.h:17459:47: warning: anonymous variadic macros were introduced in C99
In file included from gtest-all.cc:39:
gtest.h:2756: warning: ISO C++ 1998 does not support 'long long'
gtest.h:3001: warning: ISO C++ 1998 does not support 'long long'
gtest.h:3002: warning: ISO C++ 1998 does not support 'long long'
gtest-all.cc: In function 'bool testing::internal::ParseNaturalNumber
(const std::string&, Integer*)':
gtest-all.cc:1424: warning: ISO C++ 1998 does not support 'long long'
警告出现在gtest.h中的一行,表示long-long。这是我的一门课:
#include "gtest/gtest.h"
#include "MovieSystem.h"
#include "Menu.h"
class TestMenu: public::testing::Test {
protected:
Menu menu;
public:
virtual void SetUp(){
}
virtual void TearDown(){
}
public:
TestMenu() :
menu(){}
};
/***********************************************
* test the printing of the function show menu *
***********************************************/
TEST_F(TestMenu, ShowMenuCheck){
string ExpectedOut = "choose an option: n"
"1. Create new movie. n"
"2. Create new cast member. n"
"3. Add a cast member to a movie. n"
"4. Add genre to a movie. n"
"5. Define sort type to cast members of a movie. n"
"6. Print cast of a movie. n"
"7. Print a movie. n"
"8. Add movies. n"
"9. Print all movies of a cast member. n"
"10. Remove a movie. n"
"11. Remove a cast member. n"
"12. Remove a cast member from a movie. n"
"13. Print all movies. n"
"14. Print all cast members. n";
testing::internal::CaptureStdout();
menu.showMenu();
std::string ActualOut = testing::internal::GetCapturedStdout();
EXPECT_STREQ(ExpectedOut.c_str(), ActualOut.c_str());
}
有人知道问题出在哪里吗?请。。
您正在使用"pedantic"标志进行编译。如果你真的不需要它,就把它关掉。
相关文章:
- 关于std::move的使用,是否有编译警告
- 示例C++项目编译中的警告
- Steam 回调在 Linux / GCC 编译期间触发警告
- C++警告:编译指示在主文件中一次
- 如何在类成员函数中获得类似printf中的编译警告
- 编译按位 OR 时出现警告 C4805
- 窄转换编译警告.如何解决它
- C++就地析构函数编译警告
- 如何在 ubuntu 12.10 中隐藏 g++ c++11 编译警告
- 在Ubuntu中使用OpenCV进行编译警告
- 收到有关压缩结构的意外编译警告
- 在OpenCV中编译警告,并且没有输出
- 每个g++的minGW编译警告
- 在linux服务器(u2)上编译警告long-long
- 由于函数指针类型定义与具有正确const逻辑的指定函数不匹配,导致编译警告
- 分段错误,没有详细的编译警告
- 编译警告不存在(GCC 和 g++)
- c++ 11类型检查代码的奇怪编译警告
- 包含不可复制对象的对象的编译警告是不可读的
- 长类型Max等于int Max error + math.h pow()编译警告:隐式常量转换溢出