Help In C

James Burkle james.burkle at gmail.com
Sun Jul 5 21:57:42 BST 2009


This has absolutely nothing to do with motu....


Sent from my iPhone

On Jul 5, 2009, at 9:00 AM, supravat paul <supravatpaul_surya at yahoo.co.in 
 > wrote:

> Hello every one I'm using Ubuntu 9.04 Linux.... I'm facing some  
> problem while compiling my C program:::
>
>
> #include<stdio.h>
> #include<stdlib.h>
> #include<string.h>
>
> int main (int argc,char *argv[])	/* Main function */
> {
>     char cont;
>     printf("Want to enter new text? y/n: ");
>     cont=getch();
>     if(cont=='y')
>     {
>         printf("Enter text for %s",argv[1]);
>     }
>     return EXIT_SUCCESS;
> }
>
> while compiling this code with the help of following command
> $gcc -o q2 q2.c
> it gives me the following error...
>
> supravat at supravat-desktop:~/c/Done$ gcc -o q2 q2.c
> /tmp/cc07EFXt.o: In function `main':
> q2.c:(.text+0x42): undefined reference to `getch'
> collect2: ld returned 1 exit status
>
> This code runs successfully in Windows.... Please help me...
>
>
>
> Love Cricket? Check out live scores, photos, video highlights and  
> more. Click here.
> -- 
> Ubuntu-motu-mentors mailing list
> Ubuntu-motu-mentors at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu-mentors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-motu-mentors/attachments/20090705/a6747bdf/attachment.htm 


More information about the Ubuntu-motu-mentors mailing list