<div>Hi</div>
<div>Insider r.example I tried this :</div>
<div>make MODULE_TOPDIR=/home/opt/grass642RC2/grass-6.4.2RC2</div>
<div> </div>
<div> </div>
<div>and:</div><span lang="EN">
<p>/home/opt/grass642RC2/grass-6.4.2RC2/include/Make/Module.make:25: warning: overriding commands for target `install'</p>
<p>/home/opt/grass642RC2/grass-6.4.2RC2/include/Make/Rules.make:90: warning: ignoring old commands for target `install'</p>
<p>gcc -L/opt/grass642RC2/grass-6.4.2RC2/lib -Wl,--export-dynamic -Wl,-rpath-link,/opt/grass642RC2/grass-6.4.2RC2/lib -o /opt/grass642RC2/grass-6.4.2RC2/bin/r.example OBJ.x86_64-unknown-linux-gnu/main.o -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lgrass_raster.6.4.2RC2 -lgrass_pngdriver.6.4.2RC2 -lgrass_driver.6.4.2RC2 -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lfreetype -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lpng -lz -lm -lgrass_psdriver.6.4.2RC2 -lgrass_driver.6.4.2RC2 -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lfreetype -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lgrass_driver.6.4.2RC2 -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lfreetype -lgrass_gis.6.4.2RC2 -lgrass_datetime.6.4.2RC2 -lz -lm -lz </p>
<p>OBJ.x86_64-unknown-linux-gnu/main.o: In function `main':</p>
<p>/home/EOAPPKA/r.example/main.c:83: undefined reference to `G_add_keyword'</p>
<p>/home/EOAPPKA/r.example/main.c:84: undefined reference to `G_add_keyword'</p>
<p>/home/EOAPPKA/r.example/main.c:85: undefined reference to `G_add_keyword'</p>
<p>/home/EOAPPKA/r.example/main.c:103: undefined reference to `G_find_raster2'</p>
<p>/home/EOAPPKA/r.example/main.c:108: undefined reference to `Rast_map_type'</p>
<p>/home/EOAPPKA/r.example/main.c:111: undefined reference to `Rast_open_old'</p>
<p>/home/EOAPPKA/r.example/main.c:114: undefined reference to `Rast_get_cellhd'</p>
<p>/home/EOAPPKA/r.example/main.c:119: undefined reference to `Rast_allocate_buf'</p>
<p>/home/EOAPPKA/r.example/main.c:122: undefined reference to `Rast_window_rows'</p>
<p>/home/EOAPPKA/r.example/main.c:123: undefined reference to `Rast_window_cols'</p>
<p>/home/EOAPPKA/r.example/main.c:124: undefined reference to `Rast_allocate_buf'</p>
<p>/home/EOAPPKA/r.example/main.c:127: undefined reference to `Rast_open_new'</p>
<p>/home/EOAPPKA/r.example/main.c:138: undefined reference to `Rast_get_row'</p>
<p>/home/EOAPPKA/r.example/main.c:163: undefined reference to `Rast_put_row'</p>
<p>/home/EOAPPKA/r.example/main.c:171: undefined reference to `Rast_close'</p>
<p>/home/EOAPPKA/r.example/main.c:172: undefined reference to `Rast_close'</p>
<p>/home/EOAPPKA/r.example/main.c:175: undefined reference to `Rast_short_history'</p>
<p>/home/EOAPPKA/r.example/main.c:176: undefined reference to `Rast_command_history'</p>
<p>/home/EOAPPKA/r.example/main.c:177: undefined reference to `Rast_write_history'</p>
<p>collect2: ld returned 1 exit status</p>
<p>make: *** [/opt/grass642RC2/grass-6.4.2RC2/bin/r.example] Error 1</p>
<div></div></span>What might be missing here?
<div>Thanks</div>
<div>Best regards,</div>
<div>Luisa<br><br></div>
<div class="gmail_quote">2012/2/6 Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im">On Mon, Feb 6, 2012 at 10:25 AM, Luisa Peņa <<a href="mailto:luisapena1979@gmail.com">luisapena1979@gmail.com</a>> wrote:<br>> Hi Markus<br>> Already done that. I have compiled and installed from source code. So my<br>
> problem is to add and compile functions such as r.example.<br>> What do I have to do?<br>> Thanks<br>> Luisa<br><br></div>Now I see that you apparently copied it into your HOME directory.<br><br>Hence, compile it with<br>
<br>make MODULE_TOPDIR=/path/to/grass64<br><br>to tell the compiler where the main compiled GRASS code is.<br><span class="HOEnZb"><font color="#888888"><br>Markus<br></font></span>
<div class="HOEnZb">
<div class="h5"><br><br><br>> 2012/2/3 Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>><br>>><br>>> On Fri, Feb 3, 2012 at 4:36 PM, Luisa Peņa <<a href="mailto:luisapena1979@gmail.com">luisapena1979@gmail.com</a>><br>
>> wrote:<br>>> > Greetings<br>>> > I'm running GRASS6.4.2 in a Linux machine and when I try to compile<br>>> > r.example I get this:<br>>> ><br>>> > lp@earth1:~/r.example$ make<br>
>> > Makefile:10: ../../../include/Make/Module.make: No such file or<br>>> > directory<br>>> > make: *** No rule to make target `../../../include/Make/Module.make'.<br>>> > Stop.<br>
>><br>>> You need to run "configure" first in the main source code directory.<br>>><br>>> See for details for example<br>>><br>>> <a href="http://grass.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure" target="_blank">http://grass.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure</a><br>
>><br>>> Markus<br>><br>><br></div></div></blockquote></div><br>