
 
		
		
    
-  Gcc ??? getch!!!
 
	
	
 
 
 
		
			
	+ Responder ao Tópico
	
	
	
	
	
	
		
			
- 
	
	
		
	
 
- 
	
	
		
		
			
				
				
				
					
 Gcc ??? getch!!!
				
				
						
						
				
					
						
							Qual biblioteca vc esta usando para o getch ????
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
				
					
 Gcc ??? getch!!!
				
				
						
						
				
					
						
							tenta usar a biblioteca curses.h que deve funcionar ..... <IMG SRC="images/forum/icons/icon_wink.gif"> 
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
				
					
 Gcc ??? getch!!!
				
				
						
						
				
					
						
							<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>
Eu compilei o programa e gerou esta menssagem que esta mas abaixo, tipo ele ta exigindo alguma sintaxe para trocar com getch normal ? // ele ta pedido outra comandos como este " wgetch" vc tem alguma ideia sobre isto 
# include </usr/include/curses.h>
//# include </usr/include/stdio.h>
main ()
{
char tecla1,tecla2;
while((tecla1=getch())!= ´X´
                if (tecla1==0)
                {
                        tecla2=getch();
                        printf("%3d %3d\n",tecla1,tecla2);
                }else
                        printf("%3d\n",tecla1);
}
[root@infrarede teclado]# gcc codigo.c -o codigo
/tmp/ccCBeqAV.o: In function `main´:
/tmp/ccCBeqAV.o(.text+0x15): undefined reference to `stdscr´
/tmp/ccCBeqAV.o(.text+0x1a): undefined reference to `wgetch´
/tmp/ccCBeqAV.o(.text+0x3<IMG SRC="images/forum/icons/icon_cool.gif">: undefined reference to `stdscr´
/tmp/ccCBeqAV.o(.text+0x3d): undefined reference to `wgetch´
collect2: ld returned 1 exit statu
</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE> <IMG SRC="images/forum/icons/icon27.gif"> 
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
				
					
 Gcc ??? getch!!!
				
				
						
						
							
						
				
					
						
							Pelo q li na Internet aquela função getch() do Windows não é uma função standard C, mas uma extensão da Borland. No Linux, a função getch está em curses.h. Dá uma olhada na página para miores informações.
Vou pesquisar algo mais e se encontrar retorno aqui no forum.
fricardo