[Gems-users] Ruby compilation error after adding new module


Date: Sat, 28 Jul 2007 15:54:39 -0500
From: "Lide Duan" <leaderduan@xxxxxxxxx>
Subject: [Gems-users] Ruby compilation error after adding new module
Hi,

I intend to dump the stats when running ruby every xxxxx ruby cycles. I added a new module (DumpStatsTimer) to the system to do so. What I have done:
1. Created DumpStatsTimer.[h, C]. This new module derived from Consumer, and its wakeup function was modified to dump and clear stats, and also call "g_eventQueue_ptr->scheduleEvent(this, m_timer_period);" to trigger itself every a period of time.
2. Declared "DumpStatsTimer* m_dumpstatstimer_ptr;" in System.h.
3. In System.C, instantiated the object in System::System(): "m_dumpstatstimer_ptr = new DumpStatsTimer(1000);"

However, the following error occurs when compiling ruby:

x86-linux/generated/MOESI_CMP_directory/obj/System.o: In function `System':
system/System.C:132: undefined reference to `DumpStatsTimer::DumpStatsTimer(int)'
system/System.C:132: undefined reference to `DumpStatsTimer::DumpStatsTimer(int)'
collect2: ld returned 1 exit status
make[1]: *** [x86-linux/generated/MOESI_CMP_directory/bin/tester.exec] Error 1
make[1]: Leaving directory `/home/duan/GEMS1.3.1/ruby'
make: *** [all] Error 2

Seems that the system still does not recognize the new module. Is there anything I should do to make the system to see it?

Thanks,
Lide

[← Prev in Thread] Current Thread [Next in Thread→]