Saurabh Ahuja - 2009-08-31

Hi,
I am trying to create a 32 bit library on solaris 64 bit and getting following error while compiling tinyxmlerror.cpp

* Compiling source file /saurabha/prod/src/../contrib/tinyxml/tinyxmlerror.cpp
/usr/local/bin/g++ -m32 -I/saurabha/prod/src/solidifier/include -I/saurabha/prod/src/../ss-contrib/cma-sdk -I/saurabha/prod/src/../contrib/tinyxml -I/saurabha/prod/src/solidifier/include -I/saurabha/prod/src/include -I/saurabha/prod/src/common/evt/libuser/OBJ_SOL10_SPARC64_DBG -I/saurabha/prod/src/common/ipc/libuser/OBJ_SOL10_SPARC64_DBG -I/saurabha/prod/src/common/msg/libuser/OBJ_SOL10_SPARC64_DBG -I/saurabha/prod/src/common/openssl/include/OBJ_SOL10_SPARC64_DBG -IOBJ_SOL10_SPARC64_DBG -I. -mcpu=ultrasparc  -D_SYSCALL32_IMPL -DQARCH_UNIX -DQARCH_UNIX_SOLARIS -D_SYSCALL32 -DLIBICONV_PLUG -DQARCH_UNIX_SOLARIS_10 -DQARCH_64BIT -DBUILD_EPO -nostdlib -fPIC -D_KERNEL -DDBG=1 -Wall -Werror -Wno-multichar -D_LARGEFILE64_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I /saurabha/prod/src/include -g -DDEBUG -DQMEM_DEBUG -mcpu=ultrasparc -DTIXML_USE_STL -c /saurabha/prod/src/../contrib/tinyxml/tinyxmlerror.cpp -o OBJ_SOL10_SPARC64_DBG/tinyxmlerror_32.o
In file included from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/bits/stl_algobase.h:69,
                 from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/bits/char_traits.h:46,
                 from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/string:47,
                 from /saurabha/prod/src/../contrib/tinyxml/tinyxml.h:39,
                 from /saurabha/prod/src/../contrib/tinyxml/tinyxmlerror.cpp:25:
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/new:82: error: `operator new' takes type `size_t' (`unsigned int') as first parameter
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/new:83: error: `operator new' takes type `size_t' (`unsigned int') as first parameter
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/new:86: error: `operator new' takes type `size_t' (`unsigned int') as first parameter
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/new:87: error: `operator new' takes type `size_t' (`unsigned int') as first parameter
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/new:92: error: `operator new' takes type `size_t' (`unsigned int') as first parameter
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../include/c++/3.4.6/new:93: error: `operator new' takes type `size_t' (`unsigned int') as first parameter

However when i include <string> before <stdio.h> in tinyxml.h  it works correctly. can you please elaborate as i dont want to change sources.

Thanks in advance