[WINDOWS] Compile error using the full version of Visual Studio 2008?
#1
I'm new to this project so I got the latest from SVN, Installed Dx9SDK (March 2009), opened the VS2008Express project and did a rebuild-all of the Debug project. It did fairly well except for the following 4 errors:

Code:
Error    1    error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'void *'    c:\xbmc\xbmc\cores\dllloader\exports\exports_kernel32.cpp    109    XBMC
Error    2    error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'void *'    c:\xbmc\xbmc\cores\dllloader\exports\exports_kernel32.cpp    110    XBMC
Error    3    error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'void *'    c:\xbmc\xbmc\cores\dllloader\exports\exports_kernel32.cpp    111    XBMC
Error    4    error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'void *'    c:\xbmc\xbmc\cores\dllloader\exports\exports_kernel32.cpp    113    XBMC

The lines in question are:
Code:
{ "InterlockedIncrement",                         -1, (void*)InterlockedIncrement,                         NULL },
  { "InterlockedDecrement",                         -1, (void*)InterlockedDecrement,                         NULL },
  { "InterlockedExchange",                          -1, (void*)InterlockedExchange,                          NULL },
  { "InterlockedCompareExchange",                   -1, (void*)InterlockedCompareExchange,                   NULL },

Not sure exactly what kind of mixed-platform magic this is trying to accomplish, but is there something wrong in my build environment or is there a known issue with VS2008? If it makes a difference I'm running on Windows 7 RC (but I wouldn't think it would). I should also point out that I am using VS2008, not Express. Thanks.
Reply
#2
I don't believe any of us have VS2008 non-express, so that may well be the problem.

In either case, the good news is that that stuff shouldn't be required, so you can just ifdef it out.

We really need some cleanup to be done on the dll loader - I'll bring it up at devcon. On win32 we don't actually use any of that facility (nor on linux) - it's old xbox remnants.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Thanks, I will give that a try.
Reply
#4
I know some users compiled XBMC with vs2008 without a problem. this could also happen due to other DirectX or SDK versions. Never encountered it though.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
I modified the exports_kernel32.cpp file like below and it built fine. Thanks.


Code:
#ifndef _WINDOWS
  { "InterlockedIncrement",                         -1, (void*)InterlockedIncrement,                         NULL },
  { "InterlockedDecrement",                         -1, (void*)InterlockedDecrement,                         NULL },
  { "InterlockedExchange",                          -1, (void*)InterlockedExchange,                          NULL },
  { "InterlockedCompareExchange",                   -1, (void*)InterlockedCompareExchange,                   NULL },
#endif
  { "GetModuleHandleA",                             -1, (void*)dllGetModuleHandleA,                          NULL },
Reply

Logout Mark Read Team Forum Stats Members Help
[WINDOWS] Compile error using the full version of Visual Studio 2008?0