<HTML>
<HEAD>
<TITLE>trying to compile wxPython digitizer display_driver</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Martin,<BR>
<BR>
I compiled swig, but still am not able to compile your new display driver for the wxPython GUI. I've had to drop back to the earlier (non-functional) version of digit.py just to get it all to run.<BR>
<BR>
I'm pretty sure that, after installing swig, the problem lies in the Makefile, which seems to be hard-coded to match your system. I've tried playing around with some of the parameters, but have been unsuccessful. I just don't know much about the details of compiling C code. The Makefile is short, so I'm including it below along with some of my comments. Maybe someone can offer suggestions as to 1) how to make it work with my Mac and 2) how to generalize it so it works more easily with other systems as well.<BR>
<BR>
With regard to swig, this adds a major new dependency to the wxPython GUI. It doesn't come on the Mac and I had to compile it from source. IT was pretty easy, but not something other most other Mac users will want to do. Same with Windows users. Maybe we'll want to have Python-swig as a requirement anyway. Several people have mentioned this. I know generally what it swig does, but not the details. An important question is...Is swig necessary for creating the driver for digitizing in wxPython or is there potentially another way to do this? That is, can we accomplish what you are trying to do without swig, oris it essential to make it work? <BR>
<BR>
I'm looking forward to trying the new digitizer after getting this driver up and working.<BR>
<BR>
Cheers<BR>
Michal<BR>
__________________________________________<BR>
Michael Barton, Professor of Anthropology<BR>
Director of Graduate Studies<BR>
School of Human Evolution & Social Change <BR>
Center for Social Dynamics & Complexity<BR>
Arizona State University<BR>
<BR>
phone: 480-965-6213<BR>
fax: 480-965-7671<BR>
www: <a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a> <BR>
<BR>
<BR>
Makefile below ==========================<BR>
<BR>
<BR>
PYTHONVERSION=2.4<BR>
<BR>
>>>> NOTE: this should be 2.4 or above rather than hard coded to 2.4 (I have 2.5, for example). I know that there is some way to specify this, but don't remember what it is.<BR>
<BR>
MODULE_TOPDIR = ../../..<BR>
<BR>
include $(MODULE_TOPDIR)/include/Make/Lib.make<BR>
include $(MODULE_TOPDIR)/include/Make/Doxygen.make<BR>
<BR>
>>>> NOTE: This seems to imply putting the source directory for display_driver somewhere in the GRASS source tree, but I can't figure out where it is supposed to go. I've tried putting it at the root, in lib, and another place or two. My GRASS source tree happens to be in /Users/cmbarton/grass_dev/grass6. <BR>
<BR>
SWIG=swig<BR>
<BR>
CFLAGS=-c -fpic -I/usr/include/python$(PYTHONVERSION) -I./ -I$(ARCH_DISTDIR)/include `wx-config --cxxflags` <BR>
<BR>
>>>> NOTE: My Python includes are in a completely different place. I'm not sure what ARCH_DISTDIR refers to but am guessing that this needs to be set to match each system.<BR>
<BR>
LDFLAGS=-shared -L$(ARCH_LIBDIR) -lgrass_vect -lgrass_gis `wx-config --libs`<BR>
<BR>
>>>> NOTE: This may need to be changed for Mac OS X if I am correctly remembering some discussions crossing the dev list.<BR>
<BR>
default: grass6_wxdriver.so<BR>
<BR>
clean:<BR>
-rm -f *.o *.so grass6_wxdriver_wrap.cxx grass6_wxdriver.py grass6_wxdriver.i grass6_wxdriver.pyc <BR>
<BR>
grass6_wxdriver.i:<BR>
cat ./driver.i > grass6_wxdriver.i<BR>
echo "/* auto-generate swig typedef file (with some GRASS functions removed) */" >> grass6_wxdriver.i<BR>
cat ./driver.h >> grass6_wxdriver.i<BR>
<BR>
grass6_wxdriver_wrap.cxx: grass6_wxdriver.i<BR>
$(SWIG) -c++ -python -shadow $<<BR>
<BR>
grass6_wxdriver_wrap.o: grass6_wxdriver_wrap.cxx<BR>
$(CXX) $(CFLAGS) $(INCLUDE_DIRS) $<<BR>
<BR>
driver.o: driver.cc<BR>
$(CXX) $(CFLAGS) $(INCLUDE_DIRS) $<<BR>
<BR>
pseudodc.o: pseudodc.cpp<BR>
$(CXX) $(CFLAGS) $(INCLUDE_DIRS) $<<BR>
<BR>
grass6_wxdriver.so: grass6_wxdriver_wrap.o driver.o pseudodc.o<BR>
$(CXX) $(LDFLAGS) grass6_wxdriver_wrap.o driver.o pseudodc.o -o _grass6_wxdriver.so<BR>
<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>