环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2dx lib库以后,讨厌的红x消失,下来就是在cygwin里面预编译得到xxx.so文件了,但是问题来了,报错!!! jni/../../Classes/GameLayer.cpp:227:46: error: 'UINT64_C' was not declared in this scope 怎么…
解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决:在 jni/ffmpeg/libavutil/common.h中添加// add by XXX#ifndef UINT64_C#define UINT64_C(value)__CONCAT(value,ULL)#endif//-// 最后编译通过,在目录~/workspace/ffmpeg_andr…
cygwin下使用ndk编译jni时遇到的错误: /ffmpeg/include/libavutil/common.h: In function 'int av_clipl_int32_c(int64_t)': /ffmpeg/include/libavutil/common.h:178:47: error: 'UINT64_C' was not declared in this scope 解决方法: 修改头文件 /ffmpeg/include/libavutil/common.h 添加如下代…
在 libavutil/common.h 下 添加如下,即可解决 #ifdef __cplusplus#define __STDC_CONSTANT_MACROS#ifdef _STDINT_H#undef _STDINT_H#endifextern "C" {#include <stdint.h>}#endif #ifndef   UINT64_C #define   UINT64_C(value)   __CONCAT(value,ULL) #endif…
明明已经加了头文件 #include <sys/syscall.h> #include <sched.h> #include <sys/resource.h> 编译还是报错 error: 'syscall' was not declared in this scope 参考https://blog.csdn.net/kl222/article/details/17025367 ubuntu中syscall定义是放在头文件unistd.h中的. 再添加头文件unistd.…
ffmpeg 默认是用C文件来编译的,如果某个CPP文件想引用ffmpeg中的某些函数或者头文件,有可能出现 ‘UINT64_C’ was not declared in this scope的错误 情形大概如下 The same issue i'm getting here when compiling chromium with ffmpeg from svn: In file included :, , : /usr/include/libavutil/common.h: In funct…
移植了下HAL,发现编译出现如下错误 error: 'LOGE' was not declared in this scope 比较了一下android4.1的 system/core/include/cutils/log.h和android4.0的对应文件, 发现在4.1当中已经将所有的LOG宏前面加了一个字母A .所以出现上述编译错误. 修改HAL层源码:将LOGE   LOGD等等全部加个A 方法: `grep  LOG  -rl  .` 附上一个linux中的字符串查找替换用法: Lin…
Compile++ thumb  : game_shared <= main.cpp jni/hellocpp/main.cpp: In function 'void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv*, jobject, jint, jint)': jni/hellocpp/main.cpp:25:10: error: 'CCDirector' has not been declared jni/hellocpp/…
新手刚开始用Linux和c++写程序,可能会出现下面的错误 error: ‘exit’ was not declared in this scope 解决方法是 添加 #include <cstdlib>    …
问题: 将一个c文件改为cpp文件,其中的perror()改用C++中的std::cerr << strerror(error) << std::endl;来替换. 重新编译文件,出现错误: david@ubuntu:~/wrk/tmp/cpp_src/sysapps$ make g++ -g3 -Wall -o0 -c message_recv.cpp -o message_recv.o message_recv.cpp: In constructor 'Message_recv…
错误: error: ‘to_string’ was not declared in this scope 原因: to_string是C++11引入的新功能,旧版本编译器可能不支持它,所以要给编译器加上“C++11”编译支持 解决方案: Linux下的GCC编译器:在 g++ 命令行加入编译选项 -std=c++11,例如: g++ -o test test.   CodeBlocks编译器:工具栏打开Settings->Compiler,在这里勾选C++11标准即可.(参考链接) Dev C…
c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow fcgio.cpp:50: error: 'EOF' was not declared in this scope…
error: 'SIGNAL' was not declared in this scope  未在此范围内声明. connect(ui->Btnshowhello,SIGNAL(clicked(bool),this,SLOT(BtnshowhelloSlot())); 其他错误导致的此报错.. 是SIGNAL后括号忘了.…
yum install -y epel-releaseyum install -y libmcrypt-devel…
原因:C++ 1998 要求cout and endl被调用使用'std::cout'和'std::endl'格式,或using namespace std; 修改后:#include<iostream> std::cout << "Hello World!" << std::endl; 或者 #include<iostream>using namespace std;…
在代码中添加      #include <iterator>…
在编译cocos2d-x的helloworld 或者 tests的时候. 官网上使用ndk4.ndk5,这里是使用 ndkr7b.ndkr8或ndkr8b .操作会简单很多,但是出了些小问题也是很坑人的. 下面出现如下编译错误 [javascript] view plaincopy Prebuilt       : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/ SharedLibra…
在Xcode 6 beta里编译Cocos2d-x iOS项目时可能会失败,提示如下错误: Undefined symbols for architecture i386: "_fwrite$UNIX2003", referenced from: _unixErrorHandler in libcocos2dx iOS.a(tif_unix.o) _unixWarningHandler in libcocos2dx iOS.a(tif_unix.o) _empty_output_buf…
将生成的cocos2dx的Android项目导入到eclipse 可以先测试一下如何编译C++项目: 1.打开cygwin,进入到Android项目对应的目录下面去: 2.编译脚本 在编译脚本之间,如果有新添加CPP文件或者头文件,都可以在Android.mk中添加 如果要想生成指定CPU架构的.so文件,可以在Application.mk中配置: APP_ABI := armeabi armeabi-v7a x86 #只生成x86架构的CPU用的lib可以写x86,要生成所有平台的可以改为al…
无法链接glew的解决办法-编译开源库出现: error LNK2001: 无法解析的外部符号 参考官方配置指南:http://glew.sourceforge.net/install.html 1. 编译build开源库中,引入了gluw, 正常引入:.h, .lib .dll 文件后,出现下列错误 <span style=>gpu_util.obj : error LNK2001: 无法解析的外部符号 ___glewMultiTexCoord1fARB >gpu_util.obj :…
使用了预编译头依然出现error LNK2005:***obj已在***obj中定义 造成该问题的可能性比较多,本人将在今后遇到时添加进来,今天先放出本人遇到的一种情况. 多重包含含有变量定义的.h文件所造成 这个现象很容易重新,首先新建一个1.h文件,然后在里面写下如下代码 #pragma once int i = 0; 然后新建一个1.cpp,里面代码如下: #include "1.h" #include "1.h" 再新建一个2.cpp,代码如下: #incl…
现象说明: 从github上拉下LeakCanary编译时报错 CreateProcess error=2, ϵͳÕҲ»µ½ָ¶ 原因分析: 该现象是由于Windows中Gradle调用命令未加cmd.exe /C导致Windows无法识别命令 解决方案: 定位到报错的gradle代码为leakcanary-android模块的build.gradle中的gitSha()方法,修改代码为: def gitSha() { return 'cmd.exe /C git rev-parse --sho…
在编译Cocos2dx 3.6版本号时.发现编译错误: 定位代码行: debugForNormalSprite->drawPoints(positions, 4, 8, Color4F{0.0,1.0,1.0,1.0}); 改动例如以下: debugForNormalSprite->drawPoints(positions, 4, 8, Color4F<span style="color:#ff0000;">(</span>0.0,1.0,1.0,1…
转载 在Xcode 6 beta里编译Cocos2d-x iOS项目时可能会失败,提示如下错误: Undefined symbols for architecture i386: "_fwrite$UNIX2003", referenced from: _unixErrorHandler in libcocos2dx iOS.a(tif_unix.o) _unixWarningHandler in libcocos2dx iOS.a(tif_unix.o) _empty_output_…
准备 今天将cocos2d-x的示例项目tests编译到android真机运行,以及如何创建cocos2d-x的android项目. 打开cocos2d-x的tests项目,路径为:D:\cocos2d-x-2.0.1\tests 下载:PdaNet:http://xiazai.zol.com.cn/detail/36/350633.shtml 如果你的手机或者平板无法连上电脑,可以下载这个软件. 第一步:编译cocos2d-x的示例项目 首先用visual studio 打开 tests项目,…
目前使用较多的Cocos2d-x开发平台是XCode,应该是由于大部分Cocos2d-x开发者都是iOS开发出生.但是当我们将XCode开发的Cocos2d-x工程发布Android版本时,每次都需要使用ndk将Cocos2d-x的C++代码编译一遍,然后再用Eclipse打开,这个过程比较麻烦.于是本人尝试在Eclipse中实时编译Cocos2d-x的工程,即可以随时修改或添加java和android代码后,点击Eclipse中的运行完成编译. 参考的编译Cocos2d-x的教程如下: htt…
今天将cocos2d-x的示例项目tests编译到android真机运行,以及如何创建cocos2d-x的android项目. 打开cocos2d-x的tests项目,路径为:D:\cocos2d-x-2.0.1\tests 下载:PdaNet:http://xiazai.zol.com.cn/detail/36/350633.shtml 如果你的手机或者平板无法连上电脑,可以下载这个软件. 第一步:编译cocos2d-x的示例项目 首先用visual studio 打开 tests项目,看看项…
 win7下使用cygwin编译VLC http://kathy.blog.51cto.com/1168050/295460 2010-04-15 14:54:01 标签:编译 休闲 VLC 职场 win7 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://kathy.blog.51cto.com/1168050/295460 前几天使用MinGW+msys编译,错误百出 经过几天调,改还是没有成功,不是x264版本落后就是CA…
今天受命帮师弟调个OpenCV4Android 识别银行卡的程序,版本号为OpenCV4Android2.4.9,使用方式为前文介绍的第一种方式,即通过jni调用opencv.如杂家前文所述,配套的NDK应使用较高版本号的android-ndk-r9d.它的安装非常easy,解压缩后环境变量设置到Path就ok:D:\ProgramFile\android-ndk-r9d; 但遗憾的是,相同的程序相同的配置在一台PC上通过Cygwin编译一切ok.但在新的一台电脑上却出现例如以下错误: Andr…
在Ubuntu14.04 64位系统中已经安装了libc6:i386的库,编译Uboot时提示error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory. 出错原因是:缺少lib32z1库 解决方法:sudo apt-get install lib32z1…