Crystal Space
Welcome, Guest. Please login or register.
October 18, 2017, 11:08:07 pm

Login with username, password and session length
Search:     Advanced search
9063 Posts in 2051 Topics by 77209 Members
Latest Member: Bnmoer
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  link error GetGenericID
« previous next »
Pages: [1] Print
Author Topic: link error GetGenericID  (Read 1496 times)
Posts: 2

View Profile Email
« on: January 10, 2010, 07:50:32 pm »

Hi, I'm a newb doin basics CS tutorials under windows7 + VisualStudio 2008 v9.0

I've open and build wkstypical and some projects had some link errors with ::GetGenericID
*Note: I did put include + lib directory dependency and other project build successfully ( like walktest )

Projects like plgfancycon and plgcsconout had error:
Error   2   error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall iEventHandlerRegistry::GetGenericID(char const *)" (?GetGenericID@iEventHandlerRegistry@@UAEKPBD@Z)   fancycon.obj   plgfancycon

I notice that modifying the following code:
CS_CONST_METHOD virtual const csHandlerID * GenericPrec(
    csRef<iEventHandlerRegistry> &r1, csRef<iEventNameRegistry> &r2,
    csEventID e) const
    if (e == csevSystemOpen (r2)) {
      /* TODO : not thread-safe */
static csHandlerID precs[2] = { r1->GetGenericID("crystalspace.graphics3d"), CS_HANDLERLIST_END };

By replacing the last line by explicitly define each array elements like :
static csHandlerID precs[2];
precs[0] = r1->GetGenericID("crystalspace.graphics3d");

Then the project link successfully... same with plgcsconout.

Is it a known bug under my environnement ?
or maybe its no bug, do I need to modify some VisualStudio options ? is it compiler issue ?

CS Developer
Full Member
Posts: 206

View Profile Email
« Reply #1 on: January 10, 2010, 09:10:51 pm »

What CS version do you use? The latest release, 1.4, is fixed already (in the same way you worked around the issue).

It is probably a compiler bug.
Posts: 2

View Profile Email
« Reply #2 on: January 10, 2010, 09:21:26 pm »

I've use the latest stable version referring to website 1.2.1
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 6.183 seconds with 15 queries.