OK, now that I'm back from holiday I've had another look at it and found at least one bug that leads to the errors. * Jorge Almeida (j-almeida@criticalsoftware.com) [20051221 17:06]:
/usr/local/lib/libccext2.so: undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)' /usr/local/lib/libccext2.so: undefined reference to
Are you shure that version of libccext2.so was linked against the same libstdc++ as on your system? These
/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementation/smice/./common/linux/queues/CMiceQueue.h:205: error: ‘c’ was not declared in this scope
/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementation/smice/./common/linux/queues/CMiceQueue.h:233: error: ‘c’ was not declared in this scope
/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementation/smice/./common/linux/queues/CMiceQueue.h:290: error: there are no arguments to ‘top’ that depend on a template parameter, so a declaration of ‘top’ must be available
/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementation/smice/./common/linux/queues/CMiceQueue.h:318: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available
/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementation/smice/./common/linux/queues/CMiceQueue.h:319: error: there are no arguments to ‘pop’ that depend on a template parameter, so a declaration of ‘pop’ must be available
/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementation/smice/./common/linux/queues/CMiceQueue.h:348: error: ‘c’ was not declared in this scope
/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementation/smice/./common/linux/queues/CMiceQueue.h:376: error: ‘c’ was not declared in this scope
All these are called from within template functions but are not dependent on
a template parameter, just as the compiler tells you. This is one of the
cases where the compiler got more standard conforming and thus rejects the
code.
So what you have to do is make these template dependent by accessing them
via the this pointer.
Here is a patch for Template.h that does just this and also contains two other
unrelated fixes:
a) include cerrno instead of errno.h
b) *NEVER* pull symbols into the global namespace in a header! This is OK
for normal source files but headers should not do this as it makes
namespaces useless
Have fun
Philipp
--- Template.h.old 2006-01-02 17:01:10.992116161 +0100
+++ Template.h 2006-01-02 16:49:12.329953305 +0100
@@ -1,19 +1,15 @@
-
#ifndef _CMICEQUEUE_H_
#define _CMICEQUEUE_H_
#include