[GRASS-dev] Compiling and running a module in winGRASS- not running in Win7 but yes in XP

Jenny Turner jennyturner1980 at gmail.com
Wed Apr 6 06:26:41 EDT 2011


I have built a GRASS module to perform image segmentation. But, to have this
running fine I neeeded
1- g++ -fpic -c segmentimage.cpp
2- g++ -shared -o libsegmentimage.dll segmentimage.o
3- Placed .dll file in lib folder of dist folder in OSGEO4w
4- added -lsegmentimage in makefile
5- compiled successfully with make -C i.segment
make: Entering directory `/c/osgeo4w/usr/src/i.segment'
gcc -L/c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-ming
-Wl,--export-dynamic,--enable-runtime-pseudo-reloc  -L/c/OSGeo4W/apps/gd

       al-16/lib -L/c/OSGeo4W/lib     -o
OBJ.i686-pc-mingw32/hist.o OBJ.i686-pc-mingw32/main.o
OBJ.i686-pc-mingw32/open.o /C/OSGeo4W/usr/src/grass-6.4.

 svn/lib/gis/OBJ.i686-pc-mingw32/fmode.o -lgrass_I -lgras   s_gis
-lgrass_datetime -lxdr -liberty -lws2_32    -lz   -lintl   -lgrass_gis -lg

         rass_datetime -lxdr -liberty -lws2_32    -lz   -lintl
 -lgrass_gmath -lgrass_gis
                                      -lgrass_datetime -lxdr -liberty
-lws2_32    -lz   -lintl   -lsegmentimage  -lxd
                                                           r -liberty
-lws2_32    -lz
make htmlcmd
make[1]: Entering directory `/c/osgeo4w/usr/src/i.segment'
make /c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw

make[2]: Entering directory `/c/osgeo4w/usr/src/i.segment'
if [ "/c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-ming

 w32/bin/i.segment.exe" != "" ] ; then
GISBASE=c:/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw32 PATH="/c


 $PATH" PATH="/c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-



           gram Files/Common Files/Microsoft Shared/Windows Live:/c/Program
Files (x86)/Com
                           mon Files/Microsoft Shared/Windows

Files (x8
Technologies/ATI.ACE/Core-Static:/c/MATLAB7/bin/win32:/c/Program Files (x

         86)/Windows Live/Shared:.:/bin:/bin" LC_ALL=C
                              < /dev/null | grep -v '</body>\|</html>' >
i.segment.tmp.html ; true ; fi
/C/OSGeo4W/usr/src/grass-6.4.svn/tools/mkhtml.sh i.segme
                                                                   nt ;
mkdir -p /c/osgeo4w/usr/src/grass-6.4.svn/dist.i686

 -pc-mingw32/docs/html ; /bin/install -c  -m 644 i.segment.tmp.html


           ment.html ; for file in  *.png *.jpg ; do head -n 1 $file | grep
'^#!' > /dev/nu
                           ll ; if [ $? -ne 0 ] ; then /bin/install -c  -m
644 $file /c/osgeo4w/usr/src/gra

 ss-6.4.svn/dist.i686-pc-mingw32/docs/html ; fi done 2> /

 dev/null ; true
make[2]: Leaving directory `/c/osgeo4w/usr/src/i.segment'
make[1]: Leaving directory `/c/osgeo4w/usr/src/i.segment'
make mancmd
make[1]: Entering directory `/c/osgeo4w/usr/src/i.segment'
make[1]: Nothing to be done for `mancmd'.
make[1]: Leaving directory `/c/osgeo4w/usr/src/i.segment'
make: Leaving directory `/c/osgeo4w/usr/src/i.segment'

This was built in Msys in a Win7 machine

6- Then I placed exe and dll in OSGEO4w/apps/grass/grass6.4.1svn/bin
7- I runned in WinGRASS in WinXP and it runned just fine
8- I runned in WinGRASS in Win7 and I got a pop window checking error and
the following was printed in GRASS Command window:
This application has requested the Runtime to terminate it
in an unusual way.
Please contact the application's support team for more

HAs anyone an idea of what might be happening?


[GRASS]- Running a module in Win7 and XP
Jenny Turner to hellik
show details 1:24 AM (9 hours ago)
I have built a module, with a shared .dll file, and I've been able to run it
in WinXP but not in Win7. In Win/ i get:
This application has requested the Runtime to terminate it
in an unusual way.
Please contact the application's support team for more

Do you have any advice on what might be happening? The weirdest thing is
that I have compiled with OSGEO4W in Win7 not in WinXP.
If you want, or if you are able to help me, I can send you my code and my
Why am I sending you this email? because you are the most active wiNGRASS
user/dev. and maybe you are the one that can help me

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20110406/656c7924/attachment.html

More information about the grass-dev mailing list