[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster] Compiling cpp client in mac osx



Hello,

I'm having some troubles compiling xmlBlaster c++ client in Mac OS X 10.4 and was wondering if anyone
had successfully compiled the c++ client in Mac OS X. I ran into several troubles, some of then I managed to solve.


Prior to the compilation I installed the required libraries and edited the build.properties:

- Zlib was already installed in osx (/usr )
- Using fink I installed both xerces-c_2.6.0 and sqlite 2.8.16 (/sw)

- Build.properties:
XMLBLASTER_ZLIB=1
zlib.include.dir=/usr/include
zlib.lib.dir=/usr/lib
# On Windows you have to choose the name, usually 'zlib' or 'zlib1' (defaults to 'z' for UNIX):
zlib.lib.name=zlib


#SQLITE
XMLBLASTER_PERSISTENT_QUEUE=1
sqlite.include.dir=/sw/include
sqlite.lib.dir=/sw/lib

#XERCES
xerces.include.dir=/sw/include/xercesc
xerces.lib.dir=/sw/lib
xerces.lib.name=xerces-c_2

XMLCPP_HOME = /sw/lib


--------- During the compilation i got the following errors:

- First malloc.h wasn't being found. This was easily solved editing the #include in source code.

After this problem was solved the following command (the ./build - verbose cpp showed me the command)
gcc -g -prebind -dynamiclib -o libxmlBlasterClientCD.dylib ../ build.tmp/objCD/helper.o ../build.tmp/objCD/ XmlBlasterAccessUnparsed.o ../build.tmp/objCD/ CallbackServerUnparsed.o ../build.tmp/objCD/ XmlBlasterConnectionUnparsed.o ../build.tmp/objCD/msgUtil.o ../ build.tmp/objCD/xmlBlasterSocket.o ../build.tmp/objCD/ SQLiteQueue.o ../build.tmp/objCD/Properties.o ../build.tmp/objCD/ xmlBlasterZlib.old: warning prebinding disabled because of undefined symbols


ld: Undefined symbols:
_gethostbyname_r
_sqlite_bind
_sqlite_close
_sqlite_compile
_sqlite_decode_binary
_sqlite_encode_binary
_sqlite_error_string
_sqlite_exec
_sqlite_finalize
_sqlite_freemem
_sqlite_last_statement_changes
_sqlite_open
_sqlite_reset
_sqlite_step
_deflate
_deflateEnd
_deflateInit_
_inflate
_inflateEnd
_inflateInit_
_zError
/usr/bin/libtool: internal link edit command failed


Most of these undefined symbols were solved by removing the -prebind and including the right libraries, thus the new command looked like :
gcc -g -dynamiclib -L/usr/lib -L/sw/lib -lsqlite -lz -lpthread /* The rest of the command was removed */


Unfortunately _gethostbyname_r doesn't get solved and after "googling" it seems that this symbols doesn't exist in OS X.

Any help would be really appreciated,
Ricardo Jota