[Ace-users] Problem: ISO C++ forbids declaration of `ACE_Cached_Allocator' with no type

comp.soft-sys.ace maxim.bakushin at gmail.com
Wed Nov 21 11:15:29 CST 2007


ACE VERSION: 5.6
HOST MACHINE and OPERATING SYSTEM:    Windows XP/ VxWorks 6.4
COMPILER NAME AND VERSION (AND PATCHLEVEL): GCC 3.4
THE $ACE_ROOT/ace/config.h FILE : #include "ace/config-vxworks6.4.h"
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU
FILE :platform_macros.GNU
DESCRIPTION:
building PPC603gnu/Test.o
Test.cpp:12: error: ISO C++ forbids declaration of
`ACE_Cached_Allocator' with no type
Test.cpp:12: error: expected `;' before '<' token
C:\WindRiver\vxworks-6.4\host\x86-win32\bin\make.exe: *** [PPC603gnu/
Test.o] Error 1

In order to reproduce the problem, the following C++ code was written:
#include <vxworks.h>
#include <ace/os_ns_thread.h>

class A
{
public:
	A() {};
	virtual ~A() {};

public:
	typedef ACE_Cached_Allocator< typename(A), ACE_Thread_Mutex >
Allocator;
	static Allocator* allocator_;
};

What is the problem with declaration of a variable ? Anybody faced
such a problem ?
If you need more details, please let me know.
Please advise.
Thanks in advance.
maximb


More information about the Ace-users mailing list