Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Risolto] GTKmm
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
iDarbert
Apprentice
Apprentice


Joined: 19 Nov 2003
Posts: 251
Location: Bergamo, BG

PostPosted: Sun Apr 18, 2004 12:44 pm    Post subject: [Risolto] GTKmm Reply with quote

Sto provando l'helloworld di GTKmm ma mi sono imbattuto in un problema; al momento di compilare do un
Code:
g++ helloworld.cc -o helloworld `pkg-config gtkmm-2.0 --cflags --libs`
e mi esce
Code:
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status


Non ho idea di cosa sia...
_________________
Perchè gli utenti BSD odiano tanto Linux?


Last edited by iDarbert on Sun Apr 18, 2004 2:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31194
Location: here

PostPosted: Sun Apr 18, 2004 1:51 pm    Post subject: Reply with quote

Quell'errore ritorna solitamente quando nel programma non c'e' la funzione main (obbligatoria sia in C che in C++).
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
iDarbert
Apprentice
Apprentice


Joined: 19 Nov 2003
Posts: 251
Location: Bergamo, BG

PostPosted: Sun Apr 18, 2004 2:19 pm    Post subject: Reply with quote

........................................
Oh cavolo, è vero... quindi potrei provare a copiare la funzione main da main.cc (che quando cerco di compilare dice di non trovare la classe HelloWorld, situata in helloworld.h)
Perchè questo? Se gli do #include "helloworld.h" dovrebbe trovare la classe anche se è in unaltro file giusto?

Grazie per il consiglio, quando ho visto crt1.o non sapevo più che pensare :roll:
_________________
Perchè gli utenti BSD odiano tanto Linux?
Back to top
View user's profile Send private message
iDarbert
Apprentice
Apprentice


Joined: 19 Nov 2003
Posts: 251
Location: Bergamo, BG

PostPosted: Sun Apr 18, 2004 2:37 pm    Post subject: Reply with quote

Mi vergogno sempre di più... seguendo le istruzioni senza pensare a quello che facevo ho incluso helloworld.h anzichè helloworld.cc :oops:
_________________
Perchè gli utenti BSD odiano tanto Linux?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum