Help - Search - Members - Calendar
Full Version: error compiling SDK
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
Moguta
QUOTE
../../pfc/list.h(208) : error C2440: 'initializing' : cannot convert from 'void *const ' to 'void *& '

I recieved the above error message when compiling the SDK with my component code.

This is the function, and the specific line, having trouble:
QUOTE
bool bsearch_range(int (__cdecl *compare )(T elem1, T elem2 ),T item,int * index,int * count) const
{
  int max = get_count();
  int min = 0;
  int ptr;
  while(min<max)
  {
   ptr = min + (max-min) / 2; 
   T& test = buffer[ptr];
   int result = compare(test,item);
   if (result<0) min = ptr + 1;
   else if (result>0) max = ptr;
   else
   {
    int num = 1;
    while(ptr>0 && !compare(buffer[ptr-1],item)) {ptr--;num++;}
    while(ptr+num<get_count() && !compare(buffer[ptr+num],item)) num++;
    if (index) *index = ptr;
    if (count) *count = num;
    return 1;
   }
  }
  if (index) *index = min;
  return 0;
}


Can anyone help me?
kode54
EDIT: Maybe I should just ask you what you're trying to do.
Moguta
The function in my first post is simply an excerpt from /pfc/list.h in the SDK, showing the specific line where the error occured.

As for what I'm doing... compiling a component that presently does just about nothing* with the 0.8b9 SDK with MSVC++5.


*The component is a test... all it should do is create a menu entry, and cause the current playlist to switch when the menu item is clicked.
kode54
Apparently, you are the first to try to compile the SDK with Visual C++ older than 6.0. At least, as far as I can remember. Which probably isn't long.
Moguta
So the only way around this is to spend a couple hundred dollars for 6.0 or .NET? ;_;
kode54
Arr, matey, you might also be the first to suggest that.
Garf
Currently, probably yes. I don't know if GCC is usable for components. MSVC5 is stone age technology, not even remotely compatible with C++ standards.

PS. You can get much cheaper versions, especially if you're a student.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.