Greetings
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 MODULE_TOPDIR=/C/OSGeo4W/usr/src/grass-6.4.svn
make: Entering directory /c/osgeo4w/usr/src/i.segment' gcc -L/c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-ming w32/lib -Wl,--export-dynamic,--enable-runtime-pseudo-reloc -L/c/OSGeo4W/apps/gd al-16/lib -L/c/OSGeo4W/lib -o /c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw32/bin/i.segment.exe 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 32/docs/html/i.segment.html HTMLSRC=/c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw32/bin/i.segment.exe
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 GISRC=/c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw32/demolocation/.grassrc64 GISBASE=c:/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw32 PATH="/c /osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw32/bin: $PATH" PATH="/c/osgeo4w/usr/src/grass-6.4.svn/dist.i686- pc-mingw32/bin:/c/osgeo4w/usr/src/grass-6.4.svn/dist.i68 6-pc-mingw32/lib:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4/bin:/osgeo4/bin:/c/Pro gram Files/Common Files/Microsoft Shared/Windows Live:/c/Program Files (x86)/Com mon Files/Microsoft Shared/Windows Live:/c/Windows/system32:/c/Windows:/c/Window s/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files (x8 6)/ATI Technologies/ATI.ACE/Core-Static:/c/MATLAB7/bin/win32:/c/Program Files (x 86)/Windows Live/Shared:.:/bin:/bin" LC_ALL=C /c/osgeo4w/usr/src/grass-6.4.svn/dist.i686-pc-mingw32/bin/i.segment.exe --html-description < /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 /c/osgeo4w/us r/src/grass-6.4.svn_src_snapshot_2010_09_04/dist.i686-pc-mingw32/docs/html/i.seg 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
information.
HAs anyone an idea of what might be happening?
Thanks
Jenny
[GRASS]- Running a module in Win7 and XP
Reply
|
Greetings
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
information.
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 process.
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
Thans