Hello,
I'm trying to hack Inkscape 0.4.3 to compile on Solaris 10 x86, with Sun Studio 11.
Right now i'm stuck at the following:
CC -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/csw/include/freetype2 -I/opt/csw/include -D_REENTRANT -DORBIT2=1 -I/opt/csw/include/gnome-vfs-2.0 -I/opt/csw/lib/gnome-vfs-2.0/include -I/opt/csw/include/bonobo-activation-2.0 -I/opt/csw/include/libbonobo-2.0 -I/opt/csw/include/gconf/2 -I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include -I/opt/csw/include/orbit-2.0 -I/opt/csw/include -I/opt/csw/include/freetype2 -DPOTRACE="potrace" -D_REENTRANT -I/opt/csw/include/gdkmm-2.4 -I/opt/csw/lib/gdkmm-2.4/include -I/opt/csw/include/glibmm-2.4 -I/opt/csw/lib/glibmm-2.4/include -I/opt/csw/include/pangomm-1.4 -I/opt/csw/include/gtk-2.0 -I/opt/csw/lib/gtk-2.0/include -I/opt/csw/include/sigc++-2.0 -I/opt/csw/lib/sigc++-2.0/include -I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include -I/opt/csw/include/pango-1.0 -I/opt/csw/include/cairo -I/opt/csw/include/gtkmm-2.4 -I/opt/csw/lib/gtkmm-2.4/include -I/opt/csw/include/atkmm-1.6 -I/opt/csw/include/atk-1.0 -I/opt/csw/include/libxml2 -I/opt/csw/include -I/opt/csw/include/gtkspell-2.0 -I../cxxtest -I/opt/csw/include -g -c -o sp-item.o sp-item.cpp "display/nr-arena-item.h", line 112: Warning: arena hides NRArenaItem::arena. "sp-item.cpp", line 263: Warning: repr hides SPObject::repr. "sp-item.cpp", line 273: Warning: repr hides SPObject::repr. "sp-item.cpp", line 284: Error: Could not find a match for Inkscape::Util::reverse_listInkscape::Util::InputIterator(SPObject*, SPItem*) needed in SPItem::lowerOne(). "sp-item.cpp", line 290: Warning: repr hides SPObject::repr. "sp-item.cpp", line 303: Error: Could not find a match for Inkscape::Util::reverse_listInkscape::Util::InputIterator(SPObject*, SPItem*) needed in SPItem::lowerToBottom(). "sp-item.cpp", line 310: Warning: repr hides SPObject::repr. 2 Error(s) and 5 Warning(s) detected.
I suspect I need to correctly cast
"reverse_listSPObject::SiblingIterator( SP_OBJECT_PARENT(this)->firstChild(), this)," (line 284 of sp-item.cpp) so that it resolves to
"reverse_list(InputIterator start, InputIterator end)" in reverse-list.h.
Am I right about this? If so, could someone enlighten me on how to cast it correctly? (I'm no C++ expert).
Many thanks in advance. :) -- Regards, Jeremy
On 12/25/05, Jeremy Teo <white.wristband@...400...> wrote:
Hello,
A Merry Christmas to you and a Happy New Year ...
I'm trying to hack Inkscape 0.4.3 to compile on Solaris 10 x86, with Sun Studio 11.
CC -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/csw/include/freetype2 ...
I am assuming from the above that CC is the Sun compiler and is not gcc.
Are you using autotools and configure, (and does configure accept your C++ compiler)?
[ snip ] "sp-item.cpp", line 303: Error: Could not find a match for Inkscape::Util::reverse_listInkscape::Util::InputIterator(SPObject*, SPItem*) needed in SPItem::lowerToBottom(). "sp-item.cpp", line 310: Warning: repr hides SPObject::repr. 2 Error(s) and 5 Warning(s) detected.
I suspect I need to correctly cast
"reverse_listSPObject::SiblingIterator( SP_OBJECT_PARENT(this)->firstChild(), this)," (line 284 of sp-item.cpp) so that it resolves to
"reverse_list(InputIterator start, InputIterator end)" in reverse-list.h.
Am I right about this? If so, could someone enlighten me on how to cast it correctly? (I'm no C++ expert).
I think that you are on the right lines, but I think that the parameters are of type SPObject* and SPItem* (the template specialisation is applicable to the 'reverse_list' name). I would guess that on your platform the SP_OBJECT_PARENT( ) macro is not producing a pointer that can be converted implictly to an SPObject*, but that is just a guess.
Are you able to produce snippets of similar code and see which your compiler accepts? Much as the configure shell script does.
Are you able to look at the pre-processed output?
If the Inkscape team specifiy that gcc is a requirement, then you may be on your own if you have to use the Sun tools, but personally, I would be most inclined to accept patches to work around variations in standards compliance of contemporary compilers - wherever it is a quality of implementation issue - particularly where one is using meta-programming or partial specialisation, but in practice anywhere where the code is 'tricky'.
Post again if you are still having problems/wish to report success/or think that I am on the wrong lines.
If you haven't seen it, you may find 'Imperfect C++' exempli gratia <URL: http://blogs.sun.com/roller/page/garypen?entry=imperfect_c%3E, which is a guide to Practical Solutions for Real-life Programming, worth some study, but all but a few pages are quite hard going.
Ben
P.S. When other things fail, C++ has the C 'Heavy Hammer' cast and you might want to try casting the input parameters to their known expected types, as above:
( SPObject * )( SP_OBJECT_PARENT(this)->firstChild() ), ( SPItem * )( this )
which will compile and link, but I can't guarantee that it will run correctly.
participants (2)
-
Ben Fowler
-
Jeremy Teo