compile multiple source file

2012-08-31 Thread Rudra Banerjee
I have two file: #THE MAIN### #include gtk/gtk.h int main( int argc, char *argv[] ) { GtkWidget *window; GtkWidget *button; gtk_init (argc, argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width (GTK_CONTAINER (window), 10);

Re: compile multiple source file

2012-08-31 Thread Vlad Volodin
Hello, You probably did not declare the 'hello' function in the main.c file. To do this, just write a header of the function beforevthe main function. Regards, Vlad On Aug 31, 2012 4:48 PM, Rudra Banerjee bnrj.ru...@yahoo.com wrote: I have two file: #THE MAIN### #include gtk/gtk.h int

Re: compile multiple source file

2012-08-31 Thread Olivier Sessink
On 08/31/2012 04:48 PM, Rudra Banerjee wrote: If they are in separate file, then, $ gcc `pkg-config --cflags --libs gtk+-3.0` hello.c main.c -c main.c: In function ‘main’: main.c:13:5: error: ‘hello’ undeclared (first use in this function) main.c:13:5: note: each undeclared identifier is

Re: compile multiple source file

2012-08-31 Thread Rudra Banerjee
?See:  http://www.gnu.org/philosophy/no-word-attachments.html From: Olivier Sessink oliviersess...@gmail.com To: gtk-app-devel-list@gnome.org Sent: Friday, 31 August 2012 4:02 PM Subject: Re: compile multiple source file On 08/31/2012 04:48 PM, Rudra Banerjee