Compilatore GCC

Richieste d'aiuto. Quando non si sa "come fare". Il supporto per le applicazioni e sui sistemi operativi Macintosh.
maceric
Amico di Mac Peer
Posts: 270
Joined: Sun Feb 12, 2006 7:24 am

Post by maceric »

mmm strano a me ha sempre funzionato. non saprei.
del resto:
la pagina del man
clear(1) clear(1)

NAME
clear - clear the terminal screen

SYNOPSIS
clear

DESCRIPTION
clear clears your screen if this is possible. It looks in the environ-
ment for the terminal type and then in the terminfo database to figure
out how to clear the screen.

SEE ALSO
tput(1), terminfo(5)
maceric
Amico di Mac Peer
Posts: 270
Joined: Sun Feb 12, 2006 7:24 am

Post by maceric »

tze tze certo mica mi sorprendo di essere lento...
eh flash :D :D
User avatar
iGodness
Pietra Miliare di Mac Peer
Posts: 1338
Joined: Mon Feb 13, 2006 3:07 am

Post by iGodness »

OT: Ho visto nel terminale che clear e' supportato. Ma se metto la seguente stringa nel sorgente .c:



void pulisci(void){

clear(); //for linux e mac

//system("cls"); //for win

return;


L'errore e' il seguente:

/usr/bin/ld: Undefined symbols:
_clear
collect2: ld returned 1 exit status


Ho anche provato a mettere clr(); ma e' uguale.

Scusate il divagamento dal topic principale
Gran Maestro
Posts: 1457
Joined: Thu May 12, 2005 2:46 am

Post by Gran Maestro »

Ad occhio e croce, il comando clear() non si trova nella $PATH.
(/usr/bin/ld è un comando dell'editor che cerca di "linkare" clear)

Da qualche parte viene fatta una dichiarazione non esatta, oppure gli headers SDK non sono corretti.
Credo abbia a che fare con qualche incompatibilità tra gcc3 e gcc4.
Di più però non ti so dire. 8)

/P
User avatar
iGodness
Pietra Miliare di Mac Peer
Posts: 1338
Joined: Mon Feb 13, 2006 3:07 am

Post by iGodness »

Sistemato. Programma finito di compilare con successo :)
Gran Maestro
Posts: 1457
Joined: Thu May 12, 2005 2:46 am

Post by Gran Maestro »

iGodness wrote:Sistemato. Programma finito di compilare con successo :)
Bravo, ma il problema qual'era? :wink:

/P
User avatar
iGodness
Pietra Miliare di Mac Peer
Posts: 1338
Joined: Mon Feb 13, 2006 3:07 am

Post by iGodness »

Sintassi errata. Ecco il codice corretto:

void pulisci(void){

system("clear"); //for linux e mac

//system("cls"); //for win

return;

}



8)


In altre parole, errore di disattenzione.
roberto.petrara
Approdato su Mac Peer
Posts: 18
Joined: Mon Jan 29, 2007 1:47 pm

Post by roberto.petrara »

scusate ragazzi qualkuno può dirmi come faccio a programmare con mac in linguaggio visual c++?
User avatar
TheCube
Quintessenza di Mac Peer
Posts: 11944
Joined: Sun Jan 23, 2005 7:24 am

Post by TheCube »

roberto.petrara wrote:scusate ragazzi qualkuno può dirmi come faccio a programmare con mac in linguaggio visual c++?
Semplice: non puoi!
roberto.petrara
Approdato su Mac Peer
Posts: 18
Joined: Mon Jan 29, 2007 1:47 pm

Post by roberto.petrara »

TheCube wrote:
roberto.petrara wrote:scusate ragazzi qualkuno può dirmi come faccio a programmare con mac in linguaggio visual c++?
Semplice: non puoi!
è come potrei fare a programma con mac quale programma posso utilizzare?

Post Reply