Panda3d编译

来源:互联网 发布:斑竹网络意思 编辑:程序博客网 时间:2024/05/16 00:28

在官网上,先有这么一段


Note that in the past, it was very difficult to build Panda3D. Things have improved. It is now fairly straightforward to download and compile panda. In particular, this is a sensible thing to do if you wish to add some functionality to panda.To avoid possible consistency problems, the documentation for building the source is included with the source, not in the manual. Download a source package from the panda website, then look in the directory "doc," where you will find two files: INSTALL-MK and INSTALL-PP. These contain the instructions on the two different build-systems, "makepanda" and "ppremake".While building you'll get a list of not found dependencies. Further descriptions of those can be found here: Dependencies.


这里面提供的信息是:

在源代码的根目录的doc下,有两个文件,分别是INSTALL-MK 和 INSTALL-PP。这两个文件提供了具体编译Panda3D的步骤。


特别要注意的是,在编译前,下面的链接是Panda3d的依赖表:

https://www.panda3d.org/manual/index.php/Dependencies


另外,官网上有一篇教程,说到编译这件事情:

https://www.panda3d.org/manual/index.php/Tutorial:_Compiling_the_Panda3D_Source_on_Windows


实际上,我的编译步骤(Python、VS2008、DX都装好):

1、CMD下进入源代码根目录

2、makepanda\makepanda.bata --everything


就可以看到编译了(有相关的进入可以看到)。

@ 第一次失败,出错信息:  Error in ffmpegVirtualFile.cxx near line 41, column 36 

修正方式:定位到ffmpegVirtualFile.cxx,替换所有的int64_t到__int64就可以。


然后整个就可以编译过了。


如果不需要python,那么可以用 --no-python参数。

@ 会失败,出错信息:[ 35%] Building C++ object built/tmp/vision_composite1.obj vision_composite1.cxx d:\panda3d-1.7.2_no_python\panda\src\vision\openCVTexture.h(89) : error C2061: syntax error : identifier 'ssize_t' 

修正方式:定位到openCVTexture.h,在#ifdef HAVE_OPENCV下面,加入

#ifndef HAVE_SSIZE_T #ifdef MS_WIN64 typedef __int64 ssize_t; #else typedef _W64 int ssize_t; #endif #define HAVE_SSIZE_T 1 #endif 

然后整个没有python的就编译成功了。



原创粉丝点击