Hi,
I've a stack_trace class declared as following. to print the stacktrace I rely on a method which is implemented in some other library.
Above code compiles on almost all other Windows and non-windows platforms except FreeBSD
When I try to call the method e.g. ::my_print_stacktrace() in the public method I get following error:
I've included the header where this method is declared. That's the reason it compiles on other platforms. It seems compiler on FreeBSD is still not able to find the function declaration OR expecting it to be a member function of the class.
Question is how do I compile this code ?
I've a stack_trace class declared as following. to print the stacktrace I rely on a method which is implemented in some other library.
Code:
class Stack_trace
{
private:
// Don't allow to create object directory
Stack_trace();
Stack_trace(const Stack_trace&);
Stack_trace& operator=(const Stack_trace&);
virtual ~Stack_trace();
static Stack_trace * m_stack_trace;
void print_disclaimer();
public:
friend class Stack_trace_destroyer;
static void init_instance();
static Stack_trace& get_instance();
void print();
};
void Stack_trace::print()
{
print_disclaimer();
::my_print_stacktrace();
}
When I try to call the method e.g. ::my_print_stacktrace() in the public method I get following error:
Code:
error: '::my_print_stacktrace' has not been declared
Question is how do I compile this code ?
Last edited by a moderator: