matrixcascade
我把 PainterEngine_SDK 源码包放在CentOS的 /opt 目录,C的开发工程目录在 /home/[user]/Document/GCC 文件夹,SDK platform Linux 里面 makefile 的修改路径 project_path := "/home/ssr/Documents/GCC",开发工程文件就是一个 main window 的窗体代码,进入 /opt/PainEngine/platform/Linux 目录执行make之后报错。
可以分析一下原因吗?
C文件源码
#include "PainterEngine.h"
int main()
{
PainterEngine_Initialize(800, 600);
return 1;
}
make file的修改
[root@NeroPC linux]# vi /opt/PaintEngine/platform/linux/makefile
#gcc freeglut makefile
#####################################################
target :=PainterEngine
project_path := /home/ssr/Documents/GCC
#painterengine_path := ../..
painterengine_path := /opt/PaintEngine
#####################################################
make报错LOG
[root@NeroPC linux]# uname -a
Linux NeroPC 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@NeroPC linux]#
[root@NeroPC linux]# make
gcc -c /home/ssr/Documents/GCC/Windows.c -o /home/ssr/Documents/GCC/Windows.o -I "/opt/PaintEngine" -I "/opt/PaintEngine/platform/linux" -I "/opt/PaintEngine/runtime"
In file included from /opt/PaintEngine/runtime/../kernel/../core/PX_Core.h:13,
from /opt/PaintEngine/runtime/../kernel/PX_ScriptCore.h:3,
from /opt/PaintEngine/runtime/../kernel/PX_Script_Interpreter.h:7,
from /opt/PaintEngine/runtime/../kernel/PX_Kernel.h:12,
from /opt/PaintEngine/runtime/PainterEngine_Runtime.h:4,
from /opt/PaintEngine/runtime/PainterEngine_Application.h:10,
from /opt/PaintEngine/PainterEngine.h:8,
from /home/ssr/Documents/GCC/Windows.c:1:
/opt/PaintEngine/runtime/../kernel/../core/PX_Texture.h:37: error: redefinition of typedef ‘px_shape’
/opt/PaintEngine/runtime/../kernel/../core/PX_Png.h:8: note: previous declaration of ‘px_shape’ was here
In file included from /opt/PaintEngine/runtime/../kernel/PX_Resource.h:10,
from /opt/PaintEngine/runtime/../kernel/PX_Object_Executer.h:6,
from /opt/PaintEngine/runtime/../kernel/PX_Object.h:551,
from /opt/PaintEngine/runtime/../kernel/PX_Kernel.h:19,
from /opt/PaintEngine/runtime/PainterEngine_Runtime.h:4,
from /opt/PaintEngine/runtime/PainterEngine_Application.h:10,
from /opt/PaintEngine/PainterEngine.h:8,
from /home/ssr/Documents/GCC/Windows.c:1:
/opt/PaintEngine/runtime/../kernel/PX_Json.h:36: error: redefinition of typedef ‘PX_Json_Object’
/opt/PaintEngine/runtime/../kernel/PX_Json.h:20: note: previous declaration of ‘PX_Json_Object’ was here
In file included from /opt/PaintEngine/runtime/../kernel/PX_Object_PainterBox.h:5,
from /opt/PaintEngine/runtime/../kernel/PX_Object.h:567,
from /opt/PaintEngine/runtime/../kernel/PX_Kernel.h:19,
from /opt/PaintEngine/runtime/PainterEngine_Runtime.h:4,
from /opt/PaintEngine/runtime/PainterEngine_Application.h:10,
from /opt/PaintEngine/PainterEngine.h:8,
from /home/ssr/Documents/GCC/Windows.c:1:
/opt/PaintEngine/runtime/../kernel/PX_CanvasVM.h:119: error: redefinition of typedef ‘PX_CanvasVM’
/opt/PaintEngine/runtime/../kernel/PX_CanvasVM.h:41: note: previous declaration of ‘PX_CanvasVM’ was here
In file included from /opt/PaintEngine/runtime/../kernel/PX_Kernel.h:27,
from /opt/PaintEngine/runtime/PainterEngine_Runtime.h:4,
from /opt/PaintEngine/runtime/PainterEngine_Application.h:10,
from /opt/PaintEngine/PainterEngine.h:8,
from /home/ssr/Documents/GCC/Windows.c:1:
/opt/PaintEngine/runtime/../kernel/PX_CDA.h:188: error: redefinition of typedef ‘PX_CDA_Object’
/opt/PaintEngine/runtime/../kernel/PX_CDA.h:43: note: previous declaration of ‘PX_CDA_Object’ was here
/opt/PaintEngine/runtime/../kernel/PX_CDA.h:249: error: redefinition of typedef ‘PX_CDA’
/opt/PaintEngine/runtime/../kernel/PX_CDA.h:42: note: previous declaration of ‘PX_CDA’ was here
make: *** [/home/ssr/Documents/GCC/Windows.o] Error 1
[root@NeroPC linux]#