[GRASS-dev] error compiling grass on windows using cygwin

kartik.ballal at wipro.com kartik.ballal at wipro.com
Fri Mar 20 03:06:33 EDT 2009

I have installed 6.2.3 version on windows and trying to compile
r.example using cygwin. I am using below command from folder path:
/usr/local/grass-6.2.3 where I have placed the source file.
                    $ gcc -I ./include main.cpp
On executing the above command, I get an error:  'undefined reference to
G_gisinit' (also for all other functions used in r.example ). 
All the .h files are available at "./include/grass/gis.h". I also
included the necessary .h files in the code.

		>  #include <stdio.h>
		>  #include <stdlib.h>
		>  #include <string.h>
		>  #include <grass/gis.h>
		>  #include <grass/Vect.h>
		>  #include <grass/dbmi.h>
		>  #include <grass/gisdefs.h>

As per my understanding this error can occur during linking when
compiler is not able to find the function definition.
Please help me in resolving this error.

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20090320/49282ea1/attachment.html

More information about the grass-dev mailing list