首页 > 移动平台 > 详细

iostream与iostream.h乱弹琴

时间:2015-09-21 19:22:17      阅读:321      评论:0      收藏:0      [点我收藏+]

#include <iostream.h> 非标准输出流

#include <iostream>    标准输出流


见短eclipse关于使用android ndk时的简单代码。hello.cpp

#include <jni.h>
#include <iostream.h>
#include <string.h>
#include <stdio.h>

using namespace std;

int main() {

	std::string s = "string";

	printf("printf\n");

	std::cout << "cout" << std::endl;

	return 0;
}


Application.mk中,是这么写的

APP_ABI := armeabi
APP_STL := stlport_static

非常幸运的出现了一下错误。技术分享

postypes.h:230:16: error: ‘mbstate_t‘ was not declared in this scope ...

...

ios:5:7: error: ‘_STLP_NEW_IO_NAMESPACE‘ has not been declared...

...


如今该怎么解决呢?

#include <iostream.h>          ->      #include <iostream>

APP_STL := stlport_static     ->     APP_STL := gnustl_static




“.h”非标准的。C的标准库函数,无".h"的,须要用命名空间,是C++的。

其他人是不是在所有的差异,实例math。

版权声明:本文博主原创文章。博客,未经同意不得转载。

iostream与iostream.h乱弹琴

原文:http://www.cnblogs.com/lcchuguo/p/4826738.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!