Hi, i'm new to C++ and i understand someone else has asked this question on this forum before. I read the replies but still don't know how to resolve my error.

gcc version is 4.2.2. The linker error i encountered is

build_products/shared/x86/sgos_native/debug/gcc_v4.4.2/ced.o: In function `CEA_Disk_lister::CEA_Disk_lister(CEA_Disk*)':
ced.cpp:(.text._ZN15CEA_Disk_listerC1EP8CEA_Disk[_ZN15CEA_Disk_listerC1EP8CEA_Disk]+0x25): undefined reference to `vtable for CEA_Disk_lister'


And following is the class declerations

class  CEA_Disk_lister : public CEA_Process
  {
	private:
		enum
		  {
			DISK_LISTER_PROCESS_STACK_SIZE = 0x800,
			PRIORITY_RELATIVE_TO_DISK_PROCESS = -1,
			// Interval between polling for disk initialization complete

			DELAY_FOR_DISK_INITIALIZATION = 15000,
		  };

	private:
		CEA_Disk  *Disk;/*mtc*/

	private:
		void	 Process(void);

	public:
		CEA_Disk_lister( CEA_Disk *my_disk ) : Disk( my_disk ) {}
		void	Start_process(void)
			{ CEA_Process::Start_process(DISK_LISTER_PROCESS_STACK_SIZE, 
			  PRIORITY_RELATIVE_TO_DISK_PROCESS); }
  };

class CEA_Process
  {
	protected:
		enum
		  {
			START_PROCESS_REQUEST = 1		// Must be non-zero
		  };

		Pid	Process_id;

	private:
		static void THREAD_CALLCONV Process_starter();

	public:
		void	Start_process(unsigned32 stack_size, int rel_prio);
		virtual void	Process() = 0;
		Pid             Process_ident()
						  { return Process_id; }
  };

And CEA_Disk_lister::Process(void) is defined in a *.cpp.

Any help will be appreciated.

Is CEA_Process forward declared prior to CEA_Disk_lister? Because as posted it won't exist and the definition of CEA_Disk_lister will fail.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.