[Ace-users] Problem in Creating instance of Singleton class in HP UX

Mann.Patidar at gmail.com Mann.Patidar at gmail.com
Mon Sep 17 05:18:28 CDT 2007


Hi all,

      Please find my problem [creating instance of sigleton class ] in
Problem-Report-Format.

  ACE VERSION: 5.5

    HOST MACHINE and OPERATING SYSTEM:
        HP-UX 11.00

	Compiler 	HP ANSI C++ B3910B A.03.37

	 ace/config.h FILE :
		#include "ace/config-hpux-11.00.h"


    THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE
		include $(ACE_ROOT)/include/makeinclude/platform_hpux_aCC.GNU


    AREA/CLASS/EXAMPLE AFFECTED:
	When we try to create instance on any singleton class in our
application,



    DOES THE PROBLEM AFFECT:
      COMPILATION of application
[Please indicate whether ACE, your application, or both are affected.]


    SYNOPSIS:
[Brief description of the problem]
	When We are try to create a object of singleton class provided by us,
compiler is giving  compilation error :

	 unresolved symbol static at_exit (ACE_Cleanup , void );


    DESCRIPTION:
		I think this problem occur because of static object does get
instantiate when we called ACE::init();
		when we tried to get instance of singleton ,it will give the above
error.

		may be ACE_Object_Manager didnt get instantiate when we are calling
ACE::init();


	I tired few solution:
		1. I added ACE_HAS_NONSTATIC_OBJECT_MANAGER in config.h before
#include "ace/config-hpux-11.00.h"  and recompile the ace but same
error is comming


		2. We have called
			ACE_Object_Manager *OM=ACE_Object_Manager::instance();
			in main function but does not work


	Did any one have any idea how to resovle this problem.


Regards
Manish



More information about the Ace-users mailing list