Thanks to visit codestin.com
Credit goes to sourceforge.net

Menu

#25 pyFltk-1.3.3 fails to build with Visual Studio 2008 and 2010

None
closed-fixed
None
5
2015-01-31
2015-01-05
No
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG  -DWIN32=1 -I./src -I./contrib -I/usr/include -IX:\Python27-x64\include -IX:\Python27-x64\PC /Tp./python/fltk_wrap.cpp /Fobuild\temp.win-amd64-2.7\Release\./python/fltk_wrap.obj /GR
fltk_wrap.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
./python/fltk_wrap.cpp(4544) : warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
./python/fltk_wrap.cpp(4998) : error C2665: 'Fl::add_fd' : none of the 2 overloads could convert all the argument types
        X:\inclib-vc9-x64\FL/Fl.H(418): could be 'void Fl::add_fd(int,Fl_FD_Handler,void *)'
        while trying to match the argument list '(int, overloaded-function)'
./python/fltk_wrap.cpp(5549) : warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
./python/fltk_wrap.cpp(5612) : warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
./python/fltk_wrap.cpp(5719) : warning C4244: 'initializing' : conversion from 'Py_ssize_t' to 'int', possible loss of data
./python/fltk_wrap.cpp(5779) : error C2057: expected constant expression
./python/fltk_wrap.cpp(5779) : error C2466: cannot allocate an array of constant size 0
./python/fltk_wrap.cpp(5779) : error C2133: 'tmp' : unknown size

Discussion

  • Christoph Gohlke

    Using this for now:

    Index: pyfltk/swig/Fl.i
    ===================================================================
    --- pyfltk/swig/Fl.i    (revision 503)
    +++ pyfltk/swig/Fl.i    (working copy)
    @@ -362,7 +362,7 @@
             }
             if (cb == NULL) {
               // only add one callback, actual callback list is kept in Python
    -          Fl::add_fd(fd, pyFLTK_fdCallback);
    +          Fl::add_fd(fd, (Fl_FD_Handler)pyFLTK_fdCallback);
    
               // add the python callback
               fd_link *cb = new fd_link;
    Index: pyfltk/swig/Fl_Gl_Window.i
    ===================================================================
    --- pyfltk/swig/Fl_Gl_Window.i  (revision 503)
    +++ pyfltk/swig/Fl_Gl_Window.i  (working copy)
    @@ -63,7 +63,7 @@
         int i, height=self->h(), halfheight=self->h()/2, rowsize=self->w()*3;
         char *row0, *row1;
    
    -    char tmp[rowsize];
    +    char* tmp = new char[rowsize];
         SWIG_AsCharPtrAndSize(rgb_py, &rgb, &len, 0);
         //PyString_AsStringAndSize(rgb_py, &rgb, &len);
    
    @@ -78,6 +78,7 @@
         }
    
         glDrawPixels(self->w(), self->h(), GL_RGB, GL_UNSIGNED_BYTE, rgb);
    +    delete [] tmp;
     }
    
     };
    
     
  • Andreas Held

    Andreas Held - 2015-01-31
    • status: unread --> pending
    • assigned_to: Andreas Held
    • Group: -->
     
  • Andreas Held

    Andreas Held - 2015-01-31

    Fixed in rev 505. Thanks Christoph for providing the patch.

     
  • Andreas Held

    Andreas Held - 2015-01-31
    • status: pending --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB