[GRASS-dev] Convert i.spec.unmix from GRASS6.3 to GRASS6.4

António Rocha antonio.rocha at deimos.com.pt
Fri Nov 27 10:47:45 EST 2009


Hello Guys

I'm trying to convert i.spec.unmix from 6.3 version to 6.4. As Markus 
explained me, probably I will just have to update libraries and other 
small details.


1- It seems to me that Libes and dependences from MakeFile are all right.
LIBES     = $(IMAGERYLIB) $(GMATHLIB) $(GISLIB) $(CURSES)
DEPENDENCIES= $(IMAGERYDEP) $(GMATHDEP) $(GISDEP)

2- I put all i.spec.unmix folder contents (excluding includes, libs) to 
c:\grass6\tests\

3- At global.h I added #include <grass/la.h>

4- I runned this at msys: make -C c:/grass6/tests/i.spec.unmix 
MODULE_TOPDIR=c:/grass6

5- And I got this from make:
test -d OBJ./a || mkdir -p OBJ./a
gcc -I/c/grass6/include -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -I/c/grass6/include     -DPACKAGE=\""grassmods"\"  
-I/c/grass6/include -o OBJ./a/hist.o -c hist.c
gcc -I/c/grass6/include -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -I/c/grass6/include     -DPACKAGE=\""grassmods"\"  
-I/c/grass6/include -o OBJ./a/histogram.o -c histogram.c
gcc -I/c/grass6/include -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -I/c/grass6/include     -DPACKAGE=\""grassmods"\"  
-I/c/grass6/include -o OBJ./a/main.o -c main.c
gcc -I/c/grass6/include -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -I/c/grass6/include     -DPACKAGE=\""grassmods"\"  
-I/c/grass6/include -o OBJ./a/open.o -c open.c
gcc -I/c/grass6/include -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -g -O2  -I/c/OSGeo4W/apps/gdal-16/include 
-I/c/OSGeo4W/include -I/c/grass6/include     -DPACKAGE=\""grassmods"\"  
-I/c/grass6/include -o OBJ./a/spec_angle.o -c spec_angle.c
spec_angle.c: In function `spectral_angle':
spec_angle.c:41: warning: assignment makes pointer from integer without 
a cast
gcc -L/c/grass6/lib -Wl,--export-dynamic,--enable-runtime-pseudo-reloc  
-L/c/OSGeo4W/apps/gdal-16/lib -L/c/OSGeo4W/lib     -o 
/c/grass6/bin/i.spec.unmix.exe OBJ./a/hist.o OBJ./a/histogram.o 
OBJ./a/main.o OBJ./a/open.o OBJ./a/spec_angle.o C:/grass6/fmode.o 
-lgrass_I -lgrass_gis -lgrass_datetime -lxdr -liberty -lws2_32 -lz      
-lgrass_gmath -lgrass_gis -lgrass_datetime -lxdr -liberty -lws2_32 
-lz      -lgrass_gis -lgrass_datetime -lxdr -liberty -lws2_32    -lz     
-lcurses   -lxdr -liberty -lws2_32    -lz

6- And as an error:
OBJ./a/main.o: In function `main':
c:/grass6/tests/i.spec.unmix/main.c:128: undefined reference to 
`G_matvect_get_column'
c:/grass6/tests/i.spec.unmix/main.c:131: undefined reference to 
`G_vector_norm_maxval'
c:/grass6/tests/i.spec.unmix/main.c:138: undefined reference to 
`G_matvect_get_column'
c:/grass6/tests/i.spec.unmix/main.c:141: undefined reference to 
`G_vector_norm_maxval'
c:/grass6/tests/i.spec.unmix/main.c:151: undefined reference to 
`G_vector_free'
c:/grass6/tests/i.spec.unmix/main.c:152: undefined reference to 
`G_vector_free'
c:/grass6/tests/i.spec.unmix/main.c:183: undefined reference to 
`G_matrix_init'
c:/grass6/tests/i.spec.unmix/main.c:189: undefined reference to 
`G_matrix_get_element'
c:/grass6/tests/i.spec.unmix/main.c:189: undefined reference to 
`G_matrix_set_element'
c:/grass6/tests/i.spec.unmix/main.c:193: undefined reference to 
`G_matrix_set_element'
c:/grass6/tests/i.spec.unmix/main.c:210: undefined reference to 
`G_matrix_transpose'
c:/grass6/tests/i.spec.unmix/main.c:224: undefined reference to 
`G_vector_init'
c:/grass6/tests/i.spec.unmix/main.c:229: undefined reference to 
`G_vector_init'
c:/grass6/tests/i.spec.unmix/main.c:234: undefined reference to 
`G_vector_init'
c:/grass6/tests/i.spec.unmix/main.c:239: undefined reference to 
`G_vector_init'
c:/grass6/tests/i.spec.unmix/main.c:243: undefined reference to 
`G_matrix_init'
c:/grass6/tests/i.spec.unmix/main.c:275: undefined reference to 
`G_vector_init'
c:/grass6/tests/i.spec.unmix/main.c:281: undefined reference to 
`G_matrix_set_element'
c:/grass6/tests/i.spec.unmix/main.c:285: undefined reference to 
`G_matrix_set_element'
c:/grass6/tests/i.spec.unmix/main.c:293: undefined reference to 
`G_matrix_set_element'
c:/grass6/tests/i.spec.unmix/main.c:305: undefined reference to 
`G_vector_sub'
c:/grass6/tests/i.spec.unmix/main.c:308: undefined reference to 
`G_vector_sub'
c:/grass6/tests/i.spec.unmix/main.c:314: undefined reference to 
`G_matrix_get_element'
c:/grass6/tests/i.spec.unmix/main.c:315: undefined reference to 
`G_matrix_set_element'
c:/grass6/tests/i.spec.unmix/main.c:318: undefined reference to 
`G_vector_norm_euclid'
c:/grass6/tests/i.spec.unmix/main.c:319: undefined reference to 
`G_vector_norm_euclid'
c:/grass6/tests/i.spec.unmix/main.c:328: undefined reference to 
`G_vector_init'
c:/grass6/tests/i.spec.unmix/main.c:332: undefined reference to 
`G_vector_norm_euclid'
c:/grass6/tests/i.spec.unmix/main.c:333: undefined reference to 
`G_vector_copy'
c:/grass6/tests/i.spec.unmix/main.c:341: undefined reference to 
`G_matrix_get_element'
c:/grass6/tests/i.spec.unmix/main.c:347: undefined reference to 
`G_vector_free'
c:/grass6/tests/i.spec.unmix/main.c:348: undefined reference to 
`G_vector_free'
c:/grass6/tests/i.spec.unmix/main.c:399: undefined reference to 
`G_matrix_free'
OBJ./a/open.o: In function `open_files':
c:/grass6/tests/i.spec.unmix/open.c:40: undefined reference to 
`G_matrix_read'
c:/grass6/tests/i.spec.unmix/open.c:53: undefined reference to 
`G_matrix_init'
c:/grass6/tests/i.spec.unmix/open.c:57: undefined reference to 
`G_matrix_transpose'
c:/grass6/tests/i.spec.unmix/open.c:58: undefined reference to 
`G_matrix_free'
OBJ./a/spec_angle.o: In function `spectral_angle':
c:/grass6/tests/i.spec.unmix/spec_angle.c:41: undefined reference to 
`G_vector_product'
c:/grass6/tests/i.spec.unmix/spec_angle.c:42: undefined reference to 
`G_vector_norm1'
c:/grass6/tests/i.spec.unmix/spec_angle.c:43: undefined reference to 
`G_vector_norm_euclid'
c:/grass6/tests/i.spec.unmix/spec_angle.c:44: undefined reference to 
`G_vector_norm_euclid'
c:/grass6/tests/i.spec.unmix/spec_angle.c:46: undefined reference to 
`G_vector_free'
collect2: ld returned 1 exit status
make: *** [/c/grass6/bin/i.spec.unmix.exe] Error 1
make: Leaving directory `/c/grass6/tests/i.spec.unmix'

Compiler is not finding the following GRASS functions:
- G_matvect_get_column
- G_vector_norm_maxval
- G_matvect_get_column
- G_vector_norm_maxval
- G_vector_free
- G_matrix_init
- G_vector_init
- G_matrix_set_element
- G_vector_sub
- G_matrix_get_element
- G_matrix_transpose
- G_vector_norm_euclid
- G_vector_copy
- G_matrix_read
- G_vector_product
- G_vector_norm1

And these functions are no longer available in 6.4. Is there any 
document/wiki that explains/resumes which functions are now replacing 
these functions?

Thanks

Best Regards
Antonio Rocha



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4642 (20091127) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




More information about the grass-dev mailing list