OS X unresolved symbol

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

alphasnd
Just popping in
Just popping in
Posts: 7
Joined: Tue May 27, 2008 13:20

OS X unresolved symbol

Postby alphasnd » Wed May 28, 2008 14:59

Hi,

When compiling CEGUI on OS X, we get an unresolved symbol at linking stage, about the CEGUI timer. A quick look in the code show than the OS timer is defined for Windows and Linux, but not for other plateform. OS X support linux like API, so we can use the linux timer and it solve the issue. Here is the patch (CEGUI 0.6.0 svn):

Index: src/CEGUISystem.cpp
===================================================================
--- src/CEGUISystem.cpp (revision 1729)
+++ src/CEGUISystem.cpp (working copy)
@@ -100,7 +100,7 @@
return timeGetTime() / 1000.0;
}

-#elif defined(__linux__)
+#else // Linux or OS X alike
#include <sys/time.h>
double SimpleTimer::currentTime()
{


May be it would be better to keep a define like:

#elif defined(__linux__) || defined(__apple_i_don_t_know_the_exact_define)
...
#else
#error "Timer not available for this platform, please implement it"
#endif


Greats,

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Wed May 28, 2008 18:12

Thanks very much for the fix, it's greatly appreciated - I shall commit this in a little while :)

CE.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 3 guests