Re: NOTE: Compiling my 1st GTK+ program
- From: EscalanteCanada netscape net (Maya)
- To: ame1 extratech com ("Alan M. Evans")
- Cc: gtk-app-devel-list gnome org
- Subject: Re: NOTE: Compiling my 1st GTK+ program
- Date: Thu, 26 Aug 2004 18:18:59 -0400
Thanks Alan!
I did as you suggested, but no, it did not work.
I tried to compile the program using the comand prompt, but I get the same results. Mam, I never thought that
compiling a GTK+ program was going to be so difficult; it was much easier with FLTK.
Well, I'll keep trying, eventually I'll find out if it me [smack me on the forehead] or the cygwin package
that is the problem [file the bug report].
For the time being, here is the last encarnation of the "Makefile"
# Exception Makefile
# Compiler name
CC=gcc
# Flagas
CFLAGS = -Wall -g -ansi `pkg-config --cflags gtk+-2.0`
LDFLAGS = `pkg-config --libs gtk+-2.0`
# Variables
OBJS = base.o
EXEC = Base
#Application name
all: $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o $(EXEC)
$(EXEC): $(OBJS)
base.o:
$(CC) $(CFLAGS) -c base.c
clean:
rm -f $(OBJS)
rm -f $(EXEC)
PHONY: clean
---------- eof ---------------
And this is the error I am gettting:
base.o(.text+0x44): In function `main':
/home/Jamil/dev/jme/tmp/GTK_TST/base.c:7: undefined reference to `_gtk_init_abi_check'
base.o(.text+0x50):/home/Jamil/dev/jme/tmp/GTK_TST/base.c:9: undefined reference to `_gtk_window_new'
base.o(.text+0x5e):/home/Jamil/dev/jme/tmp/GTK_TST/base.c:10: undefined reference to `_gtk_widget_show'
base.o(.text+0x63):/home/Jamil/dev/jme/tmp/GTK_TST/base.c:12: undefined reference to `_gtk_main'
collect2: ld returned 1 exit status
make: *** [all] Error 1
"Alan M. Evans" <ame1 extratech com> wrote:
Take the "--libs" bit out of your CFLAGS.
On Thu, 2004-08-26 at 14:56, Maya wrote:
Oops, I forgot to paste the errors I am getting now; after doing the modifications:
Sorry...:(
gcc: --export-dynamic: linker input file unused because linking not done
gcc: -lgtk-x11-2.0: linker input file unused because linking not done
gcc: -lgdk-x11-2.0: linker input file unused because linking not done
gcc: -latk-1.0: linker input file unused because linking not done
gcc: -lgdk_pixbuf-2.0: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done
gcc: -lpangoxft-1.0: linker input file unused because linking not done
gcc: -lpangox-1.0: linker input file unused because linking not done
gcc: -lpango-1.0: linker input file unused because linking not done
gcc: -lgobject-2.0: linker input file unused because linking not done
gcc: -lgmodule-2.0: linker input file unused because linking not done
gcc: -lglib-2.0: linker input file unused because linking not done
gcc: -lintl: linker input file unused because linking not done
gcc: -liconv: linker input file unused because linking not done
base.o(.text+0x44): In function `main':
/home/Jamil/dev/jme/tmp/GTK_TST/base.c:7: undefined reference to `_gtk_init_abi_check'
base.o(.text+0x50):/home/Jamil/dev/jme/tmp/GTK_TST/base.c:9: undefined reference to `_gtk_window_new'
base.o(.text+0x5e):/home/Jamil/dev/jme/tmp/GTK_TST/base.c:10: undefined reference to `_gtk_widget_show'
base.o(.text+0x63):/home/Jamil/dev/jme/tmp/GTK_TST/base.c:12: undefined reference to `_gtk_main'
collect2: ld returned 1 exit status
make: *** [all] Error 1
--
Alan M. Evans <ame1 extratech com>
Thanks in advance
--
FYI
http://www.astro.umd.edu/~marshall/abbrev.html
E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a
point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the power to make the innocent guilty and to make
the guilty innocent, and that's power.
- Malcom X
You experience miracles everyday, the first one today happened when you first opened your eyes!
--- Jorge Escalante
__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]