Like any C++ code, you will have to link with the appropriate library files to define all of the missing symbols. That means adding -L /Developer/Panda3D/lib to the command line, and whatever library names you need; based on the error messages you quote, I think this will be at least -lexpress -lnativenet -lprc -ldtoolutil . And maybe some others. I don’t know where MeshGenerator is defined; I guess that’s part of PandaAI? So you’ll need to add those libraries too.
Zeno-Gerakins-iMac:meshgen_v1.0_src zenogerakin$ g++ -Wall meshgen.cxx -o meshgen.o -fPIC -02 -arch i386 -I /Users/zenogerakin/Projects/tile_rts/Pandai_v1.0_src -I /Developer/Panda3D/include -I /usr/include/python2.6 -I /Users/zenogerakin/Projects/tile_rts/panda3d-1.7.2/dtool/src
In file included from meshNode.h:20,
from aiMeshGenerator.h:17,
from meshgen.cxx:20:
globals.h:16: warning: ignoring #pragma warning
globals.h:17: warning: ignoring #pragma warning
globals.h:18: warning: ignoring #pragma warning
Undefined symbols for architecture i386:
"TypeRegistry::ptr()", referenced from:
register_type(TypeHandle&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, TypeHandle)in ccj8IE8s.o
"TypeRegistry::register_type(TypeHandle&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
register_type(TypeHandle&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, TypeHandle)in ccj8IE8s.o
"TypeRegistry::record_derivation(TypeHandle, TypeHandle)", referenced from:
register_type(TypeHandle&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, TypeHandle)in ccj8IE8s.o
"TypedObject::init_type()", referenced from:
Socket_IP::init_type() in ccj8IE8s.o
"TypedObject::~TypedObject()", referenced from:
Socket_IP::~Socket_IP()in ccj8IE8s.o
Socket_IP::~Socket_IP()in ccj8IE8s.o
"Notify::ptr()", referenced from:
BitMask<unsigned int, 32>::set_bit(int)in ccj8IE8s.o
"Notify::assert_failure(char const*, int, char const*)", referenced from:
BitMask<unsigned int, 32>::set_bit(int)in ccj8IE8s.o
"MeshGenerator::MeshGenerator(char const*, char const*)", referenced from:
_main in ccj8IE8s.o
"typeinfo for TypedObject", referenced from:
typeinfo for Socket_IPin ccj8IE8s.o
"TypedObject::_type_handle", referenced from:
TypedObject::get_class_type() in ccj8IE8s.o
"_memory_hook", referenced from:
MemoryBase::operator delete(void*)in ccj8IE8s.o
"Socket_IP::_type_handle", referenced from:
Socket_IP::get_class_type() in ccj8IE8s.o
Socket_IP::init_type() in ccj8IE8s.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Zeno-Gerakins-iMac:meshgen_v1.0_src zenogerakin$
TypedObject.h is included with the above command. I guess this means that I have a version that doesn’t include the functions that are being called. I can think of two reasons - these functions are being compiler defined out because of the platform (I doubt it) or pandAI is written against the dev source.
sigh… I re-read your comment this morning and it makes me very depressed indeed. I’ll try again tonight, with probably improved results since I’ll actually be following the directions.
That is two tries with some additional libs. When I try to include any of the libs that drwr references in his earlier post they are not found. Probably I don’t know the right path. Anyway, enough for tonight.
Thanks in advance if anyone sees what I have wrong!