Hi to all. i installed correctly panda3d.
Following first tutorial i compiled hello world code without error.
But when i run application i have some error and i dont understand why.
this is error :
test(1079) malloc: *** error for object 0xa083f6d8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
test(1079) malloc: *** error for object 0xa083f6d8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
test(1079) malloc: *** error for object 0xa083f6d8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
test(1079) malloc: *** error for object 0xa083f6d8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
test(1079) malloc: *** error for object 0xa083f6d8: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
Attempt to reference unregistered TypeHandle!
Registered TypeHandles are:
Abort trap
Are you compiling against Python 3.1? You have to compile against the same version of Python that Panda is itself compiled against, which is I believe Python 2.6.
I’m a bit surprised if that makes a difference to a standalone C++ application, though, but it’s possible.
i try to compile with python 2.6 and i obtain this error :
In file included from /Developer/Panda3D/include/pta_uchar.h:20,
from /Developer/Panda3D/include/datagram.h:24,
from /Developer/Panda3D/include/netDatagram.h:23,
from /Developer/Panda3D/include/connectionManager.h:20,
from /Developer/Panda3D/include/pStatClientImpl.h:24,
from /Developer/Panda3D/include/pStatClient.h:21,
from /Developer/Panda3D/include/pStatThread.h:20,
from /Developer/Panda3D/include/pStatCollector.h:20,
from /Developer/Panda3D/include/renderState.h:25,
from /Developer/Panda3D/include/pandaNode.h:27,
from /Developer/Panda3D/include/nodePath.h:23,
from /Developer/Panda3D/include/windowFramework.h:19,
from /Developer/Panda3D/include/pandaFramework.h:20,
from test.cpp:1:
Perhaps you could try downloading Panda from source and compiling it directly, using makepanda, instead of using the pre-compiled version? This should resolve any possible incompatibilities from different compiler versions and the like.
Hm, I think we are narrowing down onto the source of the problem. “-arch” is an Apple extension to gcc. It appears that you have a non-Apple version of gcc installed; and this is almost certainly incompatible with the version of gcc that is installed by default when you install Xcode.
It can probably still be used to compile Panda, but there might be tricky issues that you’ll run into. If you’re a strong C++ programmer, you can probably figure them out and work around them eventually.
But it might be easier just to install the more standard compiler. From whence did you install gcc? Is it possible for you to uninstall it and install Xcode instead?
Or, you could consider doing development in Python instead, which is much more likely to go smoothly, and which a lot of people find easier to develop in than C++.
Usage: gcc [options] file…
Options:
-pass-exit-codes Exit with highest error code from a phase
–help Display this information
–target-help Display target specific command line options
–help={target|optimizers|warnings|undocumented|params}[,{[^]joined|[^]separate}]
Display specific types of command line options
(Use ‘-v --help’ to display command line options of sub-processes)
-dumpspecs Display all of the built in spec strings
-dumpversion Display the version of the compiler
-dumpmachine Display the compiler’s target processor
-print-search-dirs Display the directories in the compiler’s search path
-print-libgcc-file-name Display the name of the compiler’s companion library
-print-file-name= Display the full path to library
-print-prog-name= Display the full path to compiler component
-print-multi-directory Display the root directory for versions of libgcc
-print-multi-lib Display the mapping between command line options and
multiple library search directories
-print-multi-os-directory Display the relative path to OS libraries
-print-sysroot Display the target libraries directory
-print-sysroot-headers-suffix Display the sysroot suffix used to find headers
-Wa, Pass comma-separated on to the assembler
-Wp, Pass comma-separated on to the preprocessor
-Wl, Pass comma-separated on to the linker
-Xassembler Pass on to the assembler
-Xpreprocessor Pass on to the preprocessor
-Xlinker Pass on to the linker
-combine Pass multiple source files to compiler at once
-save-temps Do not delete intermediate files
-pipe Use pipes rather than intermediate files
-time Time the execution of each subprocess
-specs= Override built-in specs with the contents of
-std= Assume that the input sources are for
–sysroot= Use as the root directory for headers
and libraries
-B Add to the compiler’s search paths
-b Run gcc for target , if installed
-V Run gcc version number , if installed
-v Display the programs invoked by the compiler
-### Like -v but options quoted and commands not executed
-E Preprocess only; do not compile, assemble or link
-S Compile only; do not assemble or link
-c Compile and assemble, but do not link
-o Place the output into
-x Specify the language of the following input files
Permissible languages include: c c++ assembler none
‘none’ means revert to the default behavior of
guessing the language based on the file’s extension
Options starting with -g, -f, -m, -O, -W, or --param are automatically
passed on to the various sub-processes invoked by gcc. In order to pass
other options on to these processes the -W options must be used.
Yep, that’s a non-apple version of gcc, all right. You must have another version of gcc installed. What do you get for “which gcc”? The Xcode version should be in /usr/bin/gcc.
You should edit your PATH so that /usr/bin is first on the path, so that /usr/bin/gcc is found before whatever this other gcc is.
thannnnnnnnkkks a lot i changed path of gcc and all works great!
thanks for your important help
panda 3d has a good community
before start i love this framework