You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by "Madan, Hatinder" <ha...@gs.com> on 2004/11/05 14:12:39 UTC
Problems using log4cxx built on Solaris 8!
Hello everybody,
I have compiled the log4cxx and built the shared library on Solaris 8
platform.
While I link this library dynamically to build my executable, I see the
following error:
---------------------------------------------------------------------
Undefined first referenced
symbol in file
long __rwstd::InterlockedDecrement(long*)
/home/hatinm/projects/c++_logging/log4cxx-0.9.7/lib/liblogcxx.so
long __rwstd::InterlockedIncrement(long*)
/home/hatinm/projects/c++_logging/log4cxx-0.9.7/lib/liblogcxx.so
long __rwstd::InterlockedExchange(long*,long)
/home/hatinm/projects/c++_logging/log4cxx-0.9.7/lib/liblogcxx.so
ld: fatal: Symbol referencing errors. No output written
----------------------------------------------------------------------
The following is the output of nm -o -C liblogcxx.so | grep Interlocked
---------------------------------------------------------------------
[14131] |000000000000|000000000000|NOTY |GLOB |0 |UNDEF |long
__rwstd::InterlockedDecrement(long*)
[__1cH__rwstdUInterlockedDecrement6Fpl_l_]
[13326] |000000000000|000000000000|NOTY |GLOB |0 |UNDEF |long
__rwstd::InterlockedExchange(long*,long)
[__1cH__rwstdTInterlockedExchange6Fpll_l_]
[15089] |000000000000|000000000000|NOTY |GLOB |0 |UNDEF |long
__rwstd::InterlockedIncrement(long*)
[__1cH__rwstdUInterlockedIncrement6Fpl_l_]
[14430] |000007275110|000000000140|FUNC |GLOB |0 |11 |long
log4cxx::helpers::Thread::InterlockedDecrement(volatile lon\
g*)
[__1cHlog4cxxHhelpersGThreadUInterlockedDecrement6Fpol_l_]
[14672] |000007274730|000000000140|FUNC |GLOB |0 |11 |long
log4cxx::helpers::Thread::InterlockedIncrement(volatile lon\
g*)
[__1cHlog4cxxHhelpersGThreadUInterlockedIncrement6Fpol_l_]
--------------------------------------------------------------------
1) How is the scope for the undefined symbols being resolved to __rwstd:: ??
2) Another thing I notice is that these functions (Interlocked*) occur only
in 3 source files: condition.cpp, thread.cpp, objectimpl.cpp.
The references in the last file objectimpl.cpp are to the functions
Thread::Interlocked*. Hence, these are being resolved.
In the other 2 files, condition.cpp thread.cpp, whatever references
exist (barring the definition of the member version of Thread class), they
should've
been EXCLUDED out by the pre-processor (controlled by pre-processor
macros like HAVE_MS_THREAD) !!! I have duly defined the macro
HAVE_PTHREAD.
I would greatly appreciate your suggestions/ ideas on how to resolve this.
Regards,
Hatinder