Panda3D Manual: Troubleshooting ppremake on Windows
  <<prev top next>>     

This page describes potential build issues that may arise when building Panda3D using the PPremake build system on the Windows platform, and possible solutions.


ppremake doesnt run (access violation 0xc0000005)

The April/May 2005 version of Cygwin may have had an issue with getopt.

Simply open config.h in the ppremake directory, replace "#define HAVE_GETOPT 1" with "#undef HAVE_GETOPT", then rerun "make" and "make install".

invalid link option /DEBUG, when running make

This error (or something similar) is caused by the make running Cygwin's link rather than your msvc link.exe. Simply rename /usr/bin/link to /usr/bin/_link, and rerun make.

Building using Microsoft Visual C++ Toolkit 2003

Basically follow the official build instructions, using Cygwin as configuration platform and Microsoft Visual C++ Toolkit 2003 as compiler (you have to pretty much, this is very close to the primary configuration they support).

Pre-requisites:

The Panda source-code zip contains Python.

  • First, you'll need to set up your variables for MSVC, within Cygwin. What you can do is to personalize the following file for yourself, and save it to /usr/local/panda/bin/setvars:
PATH=$PATH:"/cygdrive/f/Program Files/Microsoft Visual C++ Toolkit 2003/bin"
PATH=$PATH:/usr/local/panda/bin
PATH=$PATH:/usr/local/panda/lib
PATH=$PATH:/cygdrive/f/dev/panda3d-1.0.2-cyg/thirdparty/win-python

export CL=" /I\"F:\Program Files\Microsoft Visual C++ Toolkit 2003\include\" " 
export CL="$CL /I\"F:\Program Files\Microsoft Visual C++ Toolkit 2003\include\" " 
export CL="$CL /I\"F:\program Files\Microsoft SDK\include\" " 
export CL="$CL /I\"F:\Program Files\Microsoft DirectX 9.0 SDK\include\" " 
export CL="$CL /I\"F:\dev\panda3d-1.0.2-cyg\thirdparty\win-python\include\" " 

export LINK=" /LIBPATH:\"F:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\" "
export LINK="$LINK /LIBPATH:\"F:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\" "
export LINK="$LINK /LIBPATH:\"F:\Program Files\Microsoft SDK\lib\" "
export LINK="$LINK /LIBPATH:\"F:\Program Files\Microsoft DirectX 9.0 SDK\lib\" "
export LINK="$LINK /LIBPATH:\"F:\dev\panda3d-1.0.2-cyg\thirdparty\win-python\libs\" "

export PANDA_ROOT='F:\Cygwin'

export PYTHONPATH="f:\dev\panda3d-1.0.2-cyg\thirdparty\win-python;f:\cygwin\usr\local\panda\lib"
  • then run this file from Cygwin
  . /usr/local/panda/bin/setvars

(note that there's a . at the start, and a space between the . and the rest of the command)

  • also, you will need to rename /usr/bin/link to /usr/bin/_link , in order that cygwin finds msvc link, and not the gcc link
  • Open cgywin/usr/local/panda/Config.pp (create the file, if you didnt already), and add the following lines:
  #define HAVE_DX
  • The HAVE_DX line means that you will not use DirectX (sic), which is a good thing, unless you happen to have an old DirectX 8 SDK lieing around (current version at microsoft.com is 9)
  • Note that linking dynamically is the default; and this the configuration which builds easiest
  • The Visual C++ Toolkit doesnt contain lib, only link, which can do the same thing, so open, in the panda source directory, dtool/pptempl/compilerSettings.pp, and replace
  #define LIBBER lib

with

  #define LIBBER link /lib
  • Now, you're ready to run ppremake, make and so on in dtool, then panda, as per the instructions.

(These notes taken from: http://manageddreams.com/osmpwiki/index.php?title=Panda3D).

  <<prev top next>>