Compilation errors [solved]

I’m trying to get panda3d to compile with VS2010, and have made some progress. Currently at 40%.

Error message from compiler:

d:\source\panda3d-1.7.1\panda\src\windisplay\winGraphicsWindow.cxx(2653) : error
 C2440: 'initializing' : cannot convert from 'const WinGraphicsWindow::WindowClass' to 'WinGraphicsWindow::WindowClass &'
        Conversion loses qualifiers

Source that gives the error:

const WinGraphicsWindow::WindowClass &WinGraphicsWindow::
register_window_class(const WindowProperties &props) {

  pair<WindowClasses::iterator, bool> found = 
_window_classes.insert(WindowClass(props));
  
  WindowClass &wclass = (*found.first); // This is the line it complains about.

Removing the ‘&’ makes it compile, but that’s most likely not the real solution.

However, it let me move on until the next error:

panda/src/egg/lexer.lxx(48) : error C2365: 'inp' : redefinition; previous definition was 'function'
        C:\Program\Microsoft Visual Studio 10.0\VC\include\intrin.h(275) : see declaration of 'inp'
panda/src/egg/lexer.lxx(64) : error C2659: '=' : function as left operand
panda/src/egg/lexer.lxx(168) : error C2227: left of '->read' must point to class/struct/union/generic type
panda/src/egg/lexer.lxx(169) : error C2227: left of '->gcount' must point to class/struct/union/generic type

Anyone who feels they can come up with solutions for these errors? (If I get it to compile fully, and it seems to work, I’ll post the changes I’ve done to get this far)

I’ve just checked in some simple changes that should solve these problems.

David

Thank you, David. I now have a working VS2010 compile, and the tutorial programs all worked.
This was 1.7.1, not CVS HEAD.

As promised, here’s the rest of the changes needed:

back_inserter not found

Solution by you here in the forums. Many files affected.

blabla.dll.manifest not found

This link hints that manifest files aren’t needed anymore, so that’s why they aren’t created, and therefore shouldn’t be processed with ‘mtcmd’.

cannot convert between int and MemoryInfo *

According to this NULL should be replaced with nullptr in these cases.
Affected files:
panda\src\display\graphicsEngine.cxx
panda\src\express\memoryUsage.cxx
panda\src\putil\bamReader.cxx

Conflicting values for _ITERATOR_DEBUG_LEVEL

This link and
this link tells us about this new define.

These files:
direct/src/dcparser/dcLexer.lxx
pandatool/src/vrml/vrmlLexer.lxx
pandatool/src/xfile/xLexer.lxx
also need that lexer fix.