Discussion:
[Wxart2d-users_dev] wxdocview build error
pang long
2013-08-08 07:04:44 UTC
Permalink
Dear sir/ms
My OS is ubuntu 12.04 (64bit)
My wxWidget version is 2.9.5, which is build by source code.
The following is the configure command line I used.
../wxWidgets-2.9.5/configure --with-gtk --enable-debug
--enable-debug_gdb --disable-shared --with-opengl --enable-graphics_ctx
I failed to build wxLua, so I gave up.
Directed by your page at
http://www.wxart2d.org/moin/WxArt2dInstallCmake, I successfully build
agg and kbool.
However, I encountered an build error at wxdocview:
-------------------------------------------------------------------------
[ 23%] Building CXX object
docview/src/CMakeFiles/docview.dir/xh_a2dmenu.cpp.o
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp: In member function ‘virtual wxObject* a2dToolBarXmlHandler::DoCreateResource()’:
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:338:21: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:338:36: error: ‘wxXML_ELEMENT_NODE’ was not declared in this scope
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:339:24: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:339:59: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:349:18: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
make[2]: *** [docview/src/CMakeFiles/docview.dir/xh_a2dmenu.cpp.o] Error
1
make[1]: *** [docview/src/CMakeFiles/docview.dir/all] Error 2
make: *** [all] Error 2

----------------------------------------------------------------------------------
Yours
PANG Long
klaas.holwerda
2013-08-08 20:10:33 UTC
Permalink
Hi Pang Long,

I am currently using 12.3 SUSE, used Ubuntu before, so far not much difference when compiling.

Be sure to set for wxWidgets compile, the next firs (certainly needed for wxLua).

export CXXFLAGS=-fPIC CFLAGS=-fPIC

Also make sure all in /usr/local which is from wxWidgets and wxLua or wxArt2D or wxStedit is first
removed, else things get mixed up.
So in /usr/local/lib /usr/local/include /usr/local/share etc.
E.g. headers from older versions used for current compile (this looks actually to be your problem).

Also work with the latest svn of wxLua and wxArt2D. wxLua did change a lot lately, and i am working
to get it running again since 2 days.
So first do not enable wxLua in wxArt2D, you can later add it.

I just now compiled with:
export CXXFLAGS=-fPIC CFLAGS=-fPIC

./wxWidgets-2.9.5/configure --with-gtk --enable-debug --enable-debug_gdb --disable-shared
--with-opengl --enable-graphics_ctx

When make and installed,
use cmake-gui for wxArt2D and wxLua also.

Source code: /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxdocview
Binaries: /home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxdocview

Source code: /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d
Binaries: /home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxart2d

Had to add to CMAKE_CXX_FLAGS the flag -pthread
Do set wxWidgets_USE_DEBUG in cmake-gui to On.
And CMAKE_VERBOSE_MAKEFILE is also a good idea in this stage.

This makes wxArt2d compile correctly, if the above does not help, sent me more detailed information.

Like that i thought i checked in the next fix, and i see it, why do you not have it??

Use of undefined type "wxXmlNode" in file xh_a2dmenu.cpp.
#include<wx/xml/xml.h> in "xh_a2dmenu.cpp" fixes it.

Let me know how far you get now!

Regards,

Klaas
Post by pang long
Dear sir/ms
My OS is ubuntu 12.04 (64bit)
My wxWidget version is 2.9.5, which is build by source code.
The following is the configure command line I used.
../wxWidgets-2.9.5/configure --with-gtk --enable-debug
--enable-debug_gdb --disable-shared --with-opengl --enable-graphics_ctx
I failed to build wxLua, so I gave up.
Directed by your page at
http://www.wxart2d.org/moin/WxArt2dInstallCmake, I successfully build
agg and kbool.
-------------------------------------------------------------------------
[ 23%] Building CXX object
docview/src/CMakeFiles/docview.dir/xh_a2dmenu.cpp.o
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:338:21: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:338:36: error: ‘wxXML_ELEMENT_NODE’ was not declared in this scope
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:339:24: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:339:59: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:349:18: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
make[2]: *** [docview/src/CMakeFiles/docview.dir/xh_a2dmenu.cpp.o] Error
1
make[1]: *** [docview/src/CMakeFiles/docview.dir/all] Error 2
make: *** [all] Error 2
----------------------------------------------------------------------------------
Yours
PANG Long
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Wxart2d-users_dev mailing list
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
pang long
2013-08-10 06:54:48 UTC
Permalink
Dear Klaas
Thanks a lot for your help. I built wxArt2D successfully! I ran the
sample application.
Post by klaas.holwerda
Hi Pang Long,
I am currently using 12.3 SUSE, used Ubuntu before, so far not much
difference when compiling.
Be sure to set for wxWidgets compile, the next firs (certainly needed for wxLua).
export CXXFLAGS=-fPIC CFLAGS=-fPIC
When I compiled wxLua, it reported the conflicts at -fPIC. By
searching web, I found that it was advised to add -fPIC flags and use
shared build. But it was contradiction with your advised build option.
So I gave up to build wxLua. For now, it is not necessary for me. I
mistakenly thought wxLua was the required dependency. After I read
carefully again your install instructions, I found it was optional.
Post by klaas.holwerda
Also make sure all in /usr/local which is from wxWidgets and wxLua or
wxArt2D or wxStedit is first removed, else things get mixed up.
So in /usr/local/lib /usr/local/include /usr/local/share etc.
E.g. headers from older versions used for current compile (this looks
actually to be your problem).
To be lazy, I used wxWidgets 2.8.12.1 from ubuntu repository. There
was a strange error report. At wxartbase/general/src/gen.cpp 4830, the
build could not recognize wxWidgets built-in type wxMBConv, which is
defined in wx/strconv.h as class WXDLLIMPEXP_BASE wxMBConv at line 52. I
don't know how to solve it. Then I decided to compile wxWidgets 2.9.5.
At my laptop, I didn't remove wxWidgets 2.8 installed by ubuntu
repository. After manual compilation of wxWidgets 2.9.5, wxArt2D builds
successfully.
Post by klaas.holwerda
Also work with the latest svn of wxLua and wxArt2D. wxLua did change a
lot lately, and i am working to get it running again since 2 days.
So first do not enable wxLua in wxArt2D, you can later add it.
Thank you very much for your timely reply.
Post by klaas.holwerda
export CXXFLAGS=-fPIC CFLAGS=-fPIC
I forgot to export this option. Maybe later, for wxLua, I have to
re-build wxWidget again. At least, my need is met ;-)
Post by klaas.holwerda
./wxWidgets-2.9.5/configure --with-gtk --enable-debug
--enable-debug_gdb --disable-shared --with-opengl
--enable-graphics_ctx
I execute exactly your advised configure options.
Post by klaas.holwerda
When make and installed,
use cmake-gui for wxArt2D and wxLua also.
Source
code: /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxdocview
Binaries: /home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxdocview
Source
code: /home/klaas/soft/svncheckout/trunk/wxArt2D/packages/wxart2d
Binaries: /home/klaas/soft/svncheckout/buildall/unix/gcc_gtkud/packages/wxart2d
Had to add to CMAKE_CXX_FLAGS the flag -pthread
Do set wxWidgets_USE_DEBUG in cmake-gui to On.
And CMAKE_VERBOSE_MAKEFILE is also a good idea in this stage.
Directed by http://www.wxart2d.org/moin/WxArt2dInstallCmake, I manually
build wxArt2D.
Post by klaas.holwerda
This makes wxArt2d compile correctly, if the above does not help, sent
me more detailed information.
Like that i thought i checked in the next fix, and i see it, why do you not have it??
Use of undefined type "wxXmlNode" in file xh_a2dmenu.cpp.
#include <wx/xml/xml.h> in "xh_a2dmenu.cpp" fixes it.
Right now, I checked out wxArt2D again at my laptop and build it again.
It still reported the same error. After adding the line, it works now.
I'm junior for svn. I used to git for my own code. The following is my
check-out command from http://www.wxart2d.org/moin/UbuntuInstall:

svn co https://wxart2d.svn.sourceforge.net/svnroot/wxart2d/trunk/wxArt2D
wxArt2D
Post by klaas.holwerda
Let me know how far you get now!
wxArt2D sample works! I'm a student. My project is on static code
analysis. My objective is to interactively visualize the analysis
result. I found wxArt2D met my need such as interactive choosing
elements. For now, Graphviz is used to output static graph. Could you
please give me some advices? I'm reading the wiki docs and sample codes.
I hope I can do something for wxArt2D.
Thanks a lot for your help again!

Yours
Long
Post by klaas.holwerda
Regards,
Klaas
Post by pang long
Dear sir/ms
My OS is ubuntu 12.04 (64bit)
My wxWidget version is 2.9.5, which is build by source code.
The following is the configure command line I used.
../wxWidgets-2.9.5/configure --with-gtk --enable-debug
--enable-debug_gdb --disable-shared --with-opengl --enable-graphics_ctx
I failed to build wxLua, so I gave up.
Directed by your page at
http://www.wxart2d.org/moin/WxArt2dInstallCmake, I successfully build
agg and kbool.
-------------------------------------------------------------------------
[ 23%] Building CXX object
docview/src/CMakeFiles/docview.dir/xh_a2dmenu.cpp.o
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:338:21: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:338:36: error: ‘wxXML_ELEMENT_NODE’ was not declared in this scope
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:339:24: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:339:59: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
/home/me/mywork/sca/editor/wxArt2D/packages/wxdocview/docview/src/xh_a2dmenu.cpp:349:18: error: invalid use of incomplete type ‘struct wxXmlNode’
/usr/local/include/wx-2.9/wx/xrc/xmlreshandler.h:27:27: error: forward
declaration of ‘struct wxXmlNode’
make[2]: *** [docview/src/CMakeFiles/docview.dir/xh_a2dmenu.cpp.o] Error
1
make[1]: *** [docview/src/CMakeFiles/docview.dir/all] Error 2
make: *** [all] Error 2
----------------------------------------------------------------------------------
Yours
PANG Long
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Wxart2d-users_dev mailing list
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
klaas.holwerda
2013-08-10 19:56:19 UTC
Permalink
Post by pang long
Dear Klaas
Thanks a lot for your help. I built wxArt2D successfully! I ran the
sample application.
Great, i managed to build wxLua also :-)
Post by pang long
wxArt2D sample works! I'm a student. My project is on static code
analysis.
Whatever "static code" means??
Post by pang long
My objective is to interactively visualize the analysis
result. I found wxArt2D met my need such as interactive choosing
elements. For now, Graphviz is used to output static graph. Could you
please give me some advices? I'm reading the wiki docs and sample codes.
Well i think it can be done. The wires example has some demo screens to show a schematic and how you
can build one etc.
Very likely you want to program your own objects, with a2dPins, which can be connected.
Next a save and load of those objects with the CVG format.
But maybe you have a screen shot of a some similar application, explaining what you want to do.
Several applications (like e.g Robopro ) are written for making hierarchies of schematic drawings,
so the basis stuff is there.
But you still need to extend to make it work in your situation.
Feel free to ask more.

Regards,

Klaas
pang long
2013-08-13 15:32:07 UTC
Permalink
Dear Klaas
I'm sorry to reply you lately.
---------------------------------------------
0) My reply for your last mail
---------------------------------------------
(a) static program analysis: I focus on alias analysis, concurrency
analysis.
(b) My thought is svg + event handler for edges/nodes in wxArt2D. The
output file format of my implemented analysis is .dot. I found graphviz
can transform dot file into svg file. The /samples/canvas/split provide
the event handler for mouse-over and click. These two events are enough
for me. By wxArt2D, is it possible to draw svg and then provide these
event handler? (I'm reading your sample code)
Now, Robopro is too complex for me. Maybe later I will study it.
----------------------------------------------
1) svn reversion conflicts at sourceforge.
----------------------------------------------
In your http://www.wxart2d.org/moin/UbuntuInstall, the svn reversion
is only 480. Meanwhile, from http://sourceforge.net/projects/wxart2d/,
I found another link http://svn.code.sf.net/p/wxart2d/code/trunk. Its
svn reversion is 612 (2013-08-10).
(My experience: Today, I found that I only had built the wxdocview and
forgotten wxArt2D. During building wxart2d, it failed at linking. Then I
I read carefully again your first reply. I found that the svn version
was quite old.)
----------------------------------------------
2) some samples fail to run
----------------------------------------------
I have export WXART2D=/usr/local/share/wxart2d.

(a)/samples/curves/curtuto1$ ./sample_curves_curtuto1
../wxWidgets-2.9.5/src/gtk/window.cpp(4528): assert "sb" failed in
SetScrollbar(): this window is not scrollable

(b)samples/editor/wires$ ./sample_editor_wires
/home/me/mywork/sca/editor/wxart2d-code/wxArt2D/packages/wxdocview/docview/src/docviewref.cpp(2795): assert "cmdId.GetBitmap().Ok()" failed in AddCmdToToolbar(): No Bitmap for a2dToolCmd found for:CmdMenu_Selected_CameleonSymbol

../wxWidgets-2.9.5/src/gtk/toolbar.cpp(262): assert "bitmap.IsOk()"
failed in SetImage(): invalid bitmap for wxToolBar icon

/home/me/mywork/sca/editor/wxart2d-code/wxArt2D/packages/wxdocview/docview/src/docviewref.cpp(2795): assert "cmdId.GetBitmap().Ok()" failed in AddCmdToToolbar(): No Bitmap for a2dToolCmd found for:CmdMenu_Selected_CameleonDiagram

../wxWidgets-2.9.5/src/gtk/toolbar.cpp(262): assert "bitmap.IsOk()"
failed in SetImage(): invalid bitmap for wxToolBar icon



Yours
Faithfully
Long
Post by klaas.holwerda
Post by pang long
Dear Klaas
Thanks a lot for your help. I built wxArt2D successfully! I ran the
sample application.
Great, i managed to build wxLua also :-)
Post by pang long
wxArt2D sample works! I'm a student. My project is on static code
analysis.
Whatever "static code" means??
Post by pang long
My objective is to interactively visualize the analysis
result. I found wxArt2D met my need such as interactive choosing
elements. For now, Graphviz is used to output static graph. Could you
please give me some advices? I'm reading the wiki docs and sample codes.
Well i think it can be done. The wires example has some demo screens to show a schematic and how you
can build one etc.
Very likely you want to program your own objects, with a2dPins, which can be connected.
Next a save and load of those objects with the CVG format.
But maybe you have a screen shot of a some similar application, explaining what you want to do.
Several applications (like e.g Robopro ) are written for making hierarchies of schematic drawings,
so the basis stuff is there.
But you still need to extend to make it work in your situation.
Feel free to ask more.
Regards,
Klaas
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Wxart2d-users_dev mailing list
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
klaas.holwerda
2013-08-13 20:33:39 UTC
Permalink
Hi,
Post by pang long
Dear Klaas
I'm sorry to reply you lately.
---------------------------------------------
0) My reply for your last mail
---------------------------------------------
(a) static program analysis: I focus on alias analysis, concurrency
analysis.
Not familiar with it.
Post by pang long
(b) My thought is svg + event handler for edges/nodes in wxArt2D. The
output file format of my implemented analysis is .dot. I found graphviz
can transform dot file into svg file. The /samples/canvas/split provide
the event handler for mouse-over and click. These two events are enough
for me. By wxArt2D, is it possible to draw svg and then provide these
event handler? (I'm reading your sample code)
You might be able to read the SVG,. The SVG parser is for simple SVG files. And i think graphiz SVG
output is not that complex.
SVG would only provide you with simple primitives. WxArt2D would not know what objects are in the
SVG file.
Events in SVG i have no knowledge of, so are not part of the input parser.
I think you best write an input parser for .dot files, directly transferring them into proper
a2dCanvasObjects, fit to do the job.
Mail me a simple dot file, to know what is best.
Post by pang long
Now, Robopro is too complex for me. Maybe later I will study it.
In that case look at the wires example.
Post by pang long
----------------------------------------------
1) svn reversion conflicts at sourceforge.
----------------------------------------------
In your http://www.wxart2d.org/moin/UbuntuInstall, the svn reversion
is only 480. Meanwhile, from http://sourceforge.net/projects/wxart2d/,
I found another link http://svn.code.sf.net/p/wxart2d/code/trunk. Its
svn reversion is 612 (2013-08-10).
Oke, you need the new position, did not know the old one is still there.
Will correct it.
Post by pang long
(My experience: Today, I found that I only had built the wxdocview and
forgotten wxArt2D. During building wxart2d, it failed at linking. Then I
I read carefully again your first reply. I found that the svn version
was quite old.)
Oke, it seems you succeeded.
Post by pang long
----------------------------------------------
2) some samples fail to run
----------------------------------------------
I have export WXART2D=/usr/local/share/wxart2d.
Must be:

export WXART2D=/home/me/mywork/sca/editor/wxart2d-code/wxArt2D/packages/wxart2d

The bitmaps down here, are found via that directory.
I am not sure they are installed in:
/usr/local/share/wxart2d

Maybe that is a better idea indeed.
Post by pang long
(a)/samples/curves/curtuto1$ ./sample_curves_curtuto1
../wxWidgets-2.9.5/src/gtk/window.cpp(4528): assert "sb" failed in
SetScrollbar(): this window is not scrollable
Will fix it, it is a matter of style flag to add.
Post by pang long
(b)samples/editor/wires$ ./sample_editor_wires
/home/me/mywork/sca/editor/wxart2d-code/wxArt2D/packages/wxdocview/docview/src/docviewref.cpp(2795): assert "cmdId.GetBitmap().Ok()" failed in AddCmdToToolbar(): No Bitmap for a2dToolCmd found for:CmdMenu_Selected_CameleonSymbol
../wxWidgets-2.9.5/src/gtk/toolbar.cpp(262): assert "bitmap.IsOk()"
failed in SetImage(): invalid bitmap for wxToolBar icon
/home/me/mywork/sca/editor/wxart2d-code/wxArt2D/packages/wxdocview/docview/src/docviewref.cpp(2795): assert "cmdId.GetBitmap().Ok()" failed in AddCmdToToolbar(): No Bitmap for a2dToolCmd found for:CmdMenu_Selected_CameleonDiagram
../wxWidgets-2.9.5/src/gtk/toolbar.cpp(262): assert "bitmap.IsOk()"
failed in SetImage(): invalid bitmap for wxToolBar icon
Regards,

Klaas

Loading...