[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Compiling cpp client in mac osx
Ricardo Jorge Jota wrote:
What was the change you made?
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
- Zlib was already installed in osx (/usr )
- Using fink I installed both xerces-c_2.6.0 and sqlite 2.8.16 (/sw)
# On Windows you have to choose the name, usually 'zlib' or 'zlib1'
(defaults to 'z' for UNIX):
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.
Did the C client compile well without changes (build c), where the
problems in C++ only?
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/xmlBlasterZlib.old: warning prebinding disabled
because of undefined symbols
ld: Undefined symbols:
/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 */
Looks like the cpptasks (http://sourceforge.net/projects/ant-contrib/)
has problems with Mac OS X. Probably you should ask for this issue
on the ant-contrib mailing list.
This is the C shared lib linking output on my Linux box:
gcc -g -shared -o libxmlBlasterClientCD.so ../build.tmp/objCD/helper.o
../build.tmp/objCD/xmlBlasterZlib.o -L/opt/sqlite-bin/lib -lsqlite
I wonder why cpptasks leaves away the sqlite and zlib in your case
(pthread is not needed explicitly on Linux).
This is just the thread safe variant of gethostbyname().
Unfortunately _gethostbyname_r doesn't get solved and after "googling"
it seems that this symbols doesn't exist in OS X.
Please add your own gethostbyname_r() variant in your code and implement
Please give us feedback/pathes of all changes you have added so we
can add support for MAC,
Any help would be really appreciated,