Dear sir/ms
  With Klaas's help in previous thread, I have set up wxArt2D in my own
project. I have showed a2dCanvas and draw circles on it successfully. In
my plan, I was going to draw SVG and provide the basic interactions for
the objects, such as click on edges and nodes. I used a2dIOHandlerSVGIn
to read objects into canvas by Load method. However, for importing SVG,
I encountered the following problems:
============================================
(1)Failed to link program incorporating SVG.
============================================
--------------------------------------------------
(1.a)Linker reported the error that 
--------------------------------------------------
|| /usr/local/lib/libwxart2d_gtk2ud_svgio-2.9.a(parssvg.cpp.o): In
function `a2dIOHandlerSVGIn':
/home/me/mywork/sca/editor/wxart2d-code/wxArt2D/packages/wxart2d/svgio/src/parssvg.cpp|51|
 undefined reference to `a2dCanvasDocument::ms_classInfo'
|| /usr/local/lib/libwxart2d_gtk2ud_svgio-2.9.a(parssvg.cpp.o): In
function `a2dIOHandlerSVGIn::CanLoad(std::basic_istream<char,
std::char_traits<char> >&, wxObject const*, wxClassInfo*)':
/home/me/mywork/sca/editor/wxart2d-code/wxArt2D/packages/wxart2d/svgio/src/parssvg.cpp|60|
 undefined reference to `a2dCanvasDocument::ms_classInfo'
............
............
------------------------------------------------------
(1.b)Possible direction for solution but not work yet
------------------------------------------------------
By searching web, I found that maybe it was caused by the lack of RTTI
support in wxWidgets. Maybe the link order was the cause. I had
re-ordered it, but it didn't work. In Makefile, my options are:

CPPFLAGS = $(shell wx-config --cxxflags) -fno-strict-aliasing
-I/usr/local/include/wxart2d-1.2 -I/usr/local/include/wxartbase-1.2
-I/usr/local/include/wxdocview-1.2

TOOLLINKOPTSB = $(shell wx-config --debug=yes --libs std,stc)
-L/usr/local/lib
-L/home/me/mywork/sca/editor/wxart2d-build/packages/wxart2d/lib
-L/home/me/mywork/sca/editor/wxart2d-build/thirdparty/kbool/lib
-L/home/me/mywork/sca/editor/wxart2d-build/thirdparty/agg-2.4/bin/../lib
-L/home/me/mywork/sca/editor/wxart2d-build/packages/wxdocview/share/wxdocview/../../lib
 
-L/home/me/mywork/sca/editor/wxart2d-build/packages/wxart2d/share/wxart2d/../../lib
 -lwxart2d_gtk2ud_editor-2.9 -lwxart2d_gtk2ud_gdsio-2.9 
-lwxart2d_gtk2ud_curves-2.9 -lwxart2d_gtk2ud_canextobj-2.9 
-lwxart2d_gtk2ud_canvas-2.9 -lwxart2d_gtk2ud_artbase-2.9 
-lwxart2d_gtk2ud_aggdrawer-2.9 -lwxart2d_gtk2ud_genart-2.9 
-lwxartbase_gtk2ud_generalt-2.9 -lwxartbase_gtk2ud_xmlparse-2.9 
-lwxdocview_gtk2ud_docview-2.9 -lwxart2d_gtk2ud_svgio-2.9 -lfreetype -laggctrl 
-laggplatform -lagg -lkbool /usr/local/lib/libwx_gtk2u_stc-2.9.a 
/usr/local/lib/libwx_gtk2u_aui-2.9.a /usr/local/lib/libwx_gtk2u_qa-2.9.a 
/usr/local/lib/libwx_gtk2u_xrc-2.9.a /usr/local/lib/libwx_baseu_net-2.9.a 
/usr/local/lib/libwx_gtk2u_html-2.9.a /usr/local/lib/libwx_gtk2u_adv-2.9.a 
/usr/local/lib/libwx_gtk2u_core-2.9.a /usr/local/lib/libwx_baseu_xml-2.9.a 
/usr/local/lib/libwx_baseu-2.9.a -lwxscintilla-2.9 -lgthread-2.0 -lrt -lX11 
-lSM -lgtk-x11-
 2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 
-lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 
-lglib-2.0 -lpng -lexpat -lwxregexu-2.9 -lwxtiff-2.9 -lwxjpeg-2.9 -lz -ldl -lm 
-Wl,-rpath,/usr/local/lib:/home/me/mywork/sca/editor/wxart2d-build/packages/wxart2d/lib:/home/me/mywork/sca/editor/wxart2d-build/thirdparty/kbool/lib:/home/me/mywork/sca/editor/wxart2d-build/thirdparty/agg-2.4/bin/../lib:/home/me/mywork/sca/editor/wxart2d-build/packages/wxdocview/share/wxdocview/../../lib:/home/me/mywork/sca/editor/wxart2d-build/packages/wxart2d/share/wxart2d/../../lib

WXDIR = $(shell wx-config --prefix)
WXLIB = $(WXDIR)/lib

==================================================================
(2)Problems on sample in packages/wxart2d/samples/editor/vdraws
==================================================================
It supports SVG importing. So I inspected it. But for now, it's still
complex for me.
------------------------------------------------------------------
(2.a) Texts in svg were rendered too large so that SVG are showed
disorder  
------------------------------------------------------------------
 I failed to build freetype-2.4.2. I changed header definition in sample
to exclude the freetype. Does it matter?

-----------------------------------------------------------------
(2.b) vdraws does not support title element
-----------------------------------------------------------------
I delete title elements in my file manually now.

   
(BTW, Klaas, could you please give me some hints? Thanks in advance!) 

Yours
Faithfully
PANG Long


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to