Crystal Space
Welcome, Guest. Please login or register.
September 23, 2014, 07:23:35 pm

Login with username, password and session length
Search:     Advanced search
9018 Posts in 2051 Topics by 8505 Members
Latest Member: Tonem
* 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 905 times)
Captkirk
Newbie
*
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:
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 :
Code:
static csHandlerID precs[2];
precs[0] = r1->GetGenericID("crystalspace.graphics3d");
precs[1] = CS_HANDLERLIST_END;

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 ?

Thanks
Logged
res
Develazyoper
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.
Logged
Captkirk
Newbie
*
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
Logged
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 5.175 seconds with 15 queries.