Large but small change heads-up
Hi,
I just wanted to toss out a heads-up on change 10254 that I just pushed to trunk. It removed the outdated/unsafe SP_DOCUMENT_DEFS() macro, and changed about 58 files. Most of those were just a few lines, however, so it should not cause any major conflicts. However if anyone has some pending work, now might be a good time to re-sync from trunk so as to avoid potential extra steps being needed when committing.
On Jun 3, 2011, at 7:57 PM, Jon Cruz wrote:
Hi,
I just wanted to toss out a heads-up on change 10254 that I just pushed to trunk. It removed the outdated/unsafe SP_DOCUMENT_DEFS() macro, and changed about 58 files. Most of those were just a few lines, however, so it should not cause any major conflicts. However if anyone has some pending work, now might be a good time to re-sync from trunk so as to avoid potential extra steps being needed when committing.
Additional heads-up.
I just merged in the GTK header cleanup from Alex Valavanis. Quite a few files, but mainly just the #includes fixed up.
Strong suggestion for people to pull from trunk.
Hi all,
in revision 255 is an error because the building process is crashing in windows. See http://pastebin.com/YqyMnuUT
Sincerely
UweSch
Am 04.06.2011 08:09, schrieb Jon Cruz:
On Jun 3, 2011, at 7:57 PM, Jon Cruz wrote:
Hi,
I just wanted to toss out a heads-up on change 10254 that I just pushed to trunk. It removed the outdated/unsafe SP_DOCUMENT_DEFS() macro, and changed about 58 files. Most of those were just a few lines, however, so it should not cause any major conflicts. However if anyone has some pending work, now might be a good time to re-sync from trunk so as to avoid potential extra steps being needed when committing.
Additional heads-up.
I just merged in the GTK header cleanup from Alex Valavanis. Quite a few files, but mainly just the #includes fixed up.
Strong suggestion for people to pull from trunk.
Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Jun 4, 2011, at 12:38 AM, Uwe Schöler wrote:
Hi all,
in revision 255 is an error because the building process is crashing in windows. See http://pastebin.com/YqyMnuUT
Any actual error message, or does it just silently go away?
attempting to compile rev 10255 on Windows XP, get the error message:
--- compile / cc cc : compile of build/obj/ui/dialog/filedialogimpl-win32.o required by sourc e: src/ui/dialog/filedialogimpl-win32.cpp ============ cmd ============ mingw32-g++ -c -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast- align -Wsign-compare -Woverloaded-virtual -Wswitch -O2 -mms-bitfields -fopenmp - DVERSION="0.48+devel" -DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE -DHAVE_SSL -DREL AYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unus ed)) libssl_symbol_is_present(char *s){ return 1; }" -DPOPPLER_NEW_GFXFONT -I. - Ic:\devlibs/include -Ic:\devlibs/include/gtkmm-2.4 -Ic:\devlibs/lib/gtkmm-2.4/in clude -Ic:\devlibs/include/glibmm-2.4 -Ic:\devlibs/lib/glibmm-2.4/include -Ic:\ devlibs/include/glib-2.0 -Ic:\devlibs/lib/glib-2.0/include -mms-bitfields -Ic:\d evlibs/include/sigc++-2.0 -Ic:\devlibs/lib/sigc++-2.0/include -Ic:\devlibs/inclu de/giomm-2.4 -Ic:\devlibs/lib/giomm-2.4/include -Ic:\devlibs/include/gdkmm-2.4 -Ic:\devlibs/lib/gdkmm-2.4/include -Ic:\devlibs/include/pangomm-1.4 -Ic:\devlib s/lib/pangomm-1.4/include -Ic:\devlibs/include/gtk-2.0 -Ic:\devlibs/lib/gtk-2.0/ include -Ic:\devlibs/include/pango-1.0 -Ic:\devlibs/include/pango-1.0 -Ic:\devli bs/include/pango-1.0 -Ic:\devlibs/include/cairo -Ic:\devlibs/include/gdk-pixbuf- 2.0 -Ic:\devlibs/include/cairomm-1.0 -Ic:\devlibs/lib/cairomm-1.0/include -Ic:\ devlibs/include/atkmm-1.6 -Ic:\devlibs/include/atk-1.0 -Ic:\devlibs/include/gtk- 2.0 -mms-bitfields -Ic:\devlibs/include/gtk-2.0 -Ic:\devlibs/lib/gtk-2.0/include -Ic:\devlibs/include/ImageMagick -Ic:\devlibs/include/ImageMagick -fopenmp -D_M AGICKDLL_ -Ic:\devlibs/include/libxml2 -Ic:\devlibs/include/freetype2 -Ic:\devli bs/include -Ic:\devlibs/include/cairo -Ic:\devlibs/include/poppler -Ic:\devlibs/ include/gc -Ic:\devlibs/include/libwpg-0.1 -Ic:\devlibs/include/libwpd-0.8 -Ic:\ devlibs/include/libwpg-0.1 -Ic:\devlibs/include/libwpd-0.8 -Icxxtest -Ic:\devlib s/python/include -Isrc/bind/javainc -Isrc/bind/javainc/win32 -Isrc -Isrc/2geom -Isrc/2geom/numeric -Isrc/bind -Isrc/debug -Isrc/dialogs -Isrc/display -Isrc/do m -Isrc/dom/io -Isrc/dom/odf -Isrc/dom/util -Isrc/extension -Isrc/extension/impl ementation -Isrc/extension/internal -Isrc/extension/internal/bitmap -Isrc/extens ion/internal/filter -Isrc/extension/internal/pdfinput -Isrc/extension/script -Is rc/filters -Isrc/helper -Isrc/io -Isrc/jabber_whiteboard -Isrc/jabber_whiteboard /dialog -Isrc/libavoid -Isrc/libcola -Isrc/libcroco -Isrc/libgdl -Isrc/libnr -Is rc/libnrtype -Isrc/libvpsc -Isrc/libvpsc/pairingheap -Isrc/livarot -Isrc/live_ef fects -Isrc/live_effects/parameter -Isrc/pedro -Isrc/svg -Isrc/trace -Isrc/trace /potrace -Isrc/ui -Isrc/ui/cache -Isrc/ui/dialog -Isrc/ui/tool -Isrc/ui/view -Is rc/ui/widget -Isrc/util -Isrc/widgets -Isrc/xml src/ui/dialog/filedialogimpl-win 32.cpp -o build/obj/ui/dialog/filedialogimpl-win32.o ============================= Make error line 300: problem compiling: src/document.h: In member function 'bool Inkscape::UI::Dialog::FileOpenDialogImplWin32::set_svg_preview()': src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private src/ui/dialog/filedialogimpl-win32.cpp:966:16: error: within this context src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private src/ui/dialog/filedialogimpl-win32.cpp:992:35: error: within this context src/ui/dialog/filedialogimpl-win32.cpp:992:39: error: invalid static_cast from t ype 'SPRoot*' to type 'SPItem*' src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private src/ui/dialog/filedialogimpl-win32.cpp:993:39: error: within this context src/ui/dialog/filedialogimpl-win32.cpp:993:43: error: invalid static_cast from t ype 'SPRoot*' to type 'SPItem*' src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private src/ui/dialog/filedialogimpl-win32.cpp:999:54: error: within this context src/ui/dialog/filedialogimpl-win32.cpp:999:58: error: invalid static_cast from t ype 'SPRoot*' to type 'SPItem*' src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private src/ui/dialog/filedialogimpl-win32.cpp:1036:34: error: within this context src/ui/dialog/filedialogimpl-win32.cpp:1036:38: error: invalid static_cast from type 'SPRoot*' to type 'SPItem*' src/ui/dialog/filedialogimpl-win32.cpp: In static member function 'static UINT_P TR Inkscape::UI::Dialog::FileSaveDialogImplWin32::GetSaveFileName_hookproc(HWND_ _*, UINT, WPARAM, LPARAM)': src/ui/dialog/filedialogimpl-win32.cpp:1798:74: warning: passing NULL to non-poi nter argument 1 of 'HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWO RD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)'
C:\InkscapeBZR>bzr revno 10255
On Jun 4, 2011, at 1:21 PM, Alvin Penner wrote:
attempting to compile rev 10255 on Windows XP, get the error message:
--- compile / cc cc : compile of build/obj/ui/dialog/filedialogimpl-win32.o required by sourc e: src/ui/dialog/filedialogimpl-win32.cpp ============ cmd ============
Oh, good. Those appear to be simple and easy to address:
============================= Make error line 300: problem compiling: src/document.h: In member function 'bool Inkscape::UI::Dialog::FileOpenDialogImplWin32::set_svg_preview()': src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private src/ui/dialog/filedialogimpl-win32.cpp:966:16: error: within this context src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private
The error is because the data member was changed to be private (exactly what was reported). The fix, in this case, is quite simple. Instead of accessing the data member directly as in
static_cast<SPItem *>(svgDoc->root)->invoke_bbox( maybeArea, static_cast<SPItem *>(svgDoc->root)->i2d_affine(), TRUE);
we use the accessor method and it becomes:
static_cast<SPItem *>(svgDoc->getRoot())->invoke_bbox( maybeArea, static_cast<SPItem *>(svgDoc->getRoot())->i2d_affine(), TRUE);
HOWEVER...
Thee is a second issue with these lines of code. The casts should not be needed in C++ code, are are left over from C-only coding. They should be simple to remove (especially now that getRoot() returns SPRoot* instead of the generic SPObject*)
svgDoc->getRoot()->invoke_bbox( maybeArea, svgDoc->getRoot()->i2d_affine(), TRUE);
Among other things, when the code goes to use a pointer to a subclass (SPRoot in this case), it will automatically get access to all parent class methods (SPItem's calls to invoke_bbox() and i2d_affine() in this case).
So getting rid of the c-style casting is a very good thing, leads to simpler code, and removes the potential for many bugs.
src/ui/dialog/filedialogimpl-win32.cpp:992:35: error: within this context src/ui/dialog/filedialogimpl-win32.cpp:992:39: error: invalid static_cast from t ype 'SPRoot*' to type 'SPItem*' src/document.h:99:13: error: 'SPRoot* SPDocument::root' is private src/ui/dialog/filedialogimpl-win32.cpp:993:39: error: within this context src/ui/dialog/filedialogimpl-win32.cpp:993:43: error: invalid static_cast from t ype 'SPRoot*' to type 'SPItem*'
And finally to address the "invalid static_cast" errors. Those usually come from either the source or the target types not being defined. So one or both needed header files have not been included. Generally a subclass' header file will actually bring in the header for it's parent class, so simply adding that subclass include should finish clearing things up.
#include <sp-root.h>
And then that should do the trick.
If you check revision 10256 in trunk, you can let us know if it fixes the whole compile or not. Thanks.
thanks! rev 10256 compiled perfectly on XP
Alvin Penner
participants (3)
-
Alvin Penner
-
Jon Cruz
-
Uwe Schöler