[H-GEN] Compiling error....

Martin POOL mbp at uq.net.au
Mon Jul 19 23:59:11 EDT 1999


(Note reply-to: being general at humbug.org.au vs Martin POOL <mbp at uq.net.au>)

On Tue, 20 Jul 1999, Andrae Muys wrote:
> (Note reply-to: being general at humbug.org.au vs Andrae Muys <a.muys at mailbox.uq.edu.au>)
> > (Note reply-to: being general at humbug.org.au vs Craig Eldershaw <celdersh at parc.xerox.com>)
> > 
> > >c++ -Wall -O2 `gtk-config --cflags` -lpthread nt.cc base64.o queue.o
> > >liststr.o dlist.o mdlist.o locstr.o log.o  sort.o meter.o socket.o history.o
> > >hproxy.o client.o ftp.o http.o download.o ftpd.o httpd.o signal.o main.o
> > >config.o savelog.o mainlog.o var.o  face/lmenu.o face/list.o face/addd.o
> > >face/graph.o face/log.o face/prefs.o face/buttons.o face/about.o face/edit.o
> > >face/colors.o face/saveload.o -o nt `gtk-config --libs`
> > 
> > >bash> gtk-config --cflags
> > >bash> gtk-config --libs
> > 
> > Well they seem innocent.
> > 
> Ahh craig you missed something.
> 
> c++ -Wall -O2 `gtk-config --cflags` -lpthread nt.cc
>                                     ^^^^^^^^^
> 
> Putting a library before a source file is not normally supported by most
> compilers.

I missed the start of this thread, so excuse me if you've already tried
this:

in 1.2, gtk and gnome changed the command-line syntax for the *-config
scripts.  You probably want to say

c++ -Wall -O2 `gtk-config --cflags gtk+`

That is, you must also specify the name of the component whose
configuration you want.  If gtk+ and glib were configured with thread
support (which is now the default I think) then they ought to
automatically supply -lpthread.  Note you may also need to check
-D_REENTRANT is supplied (for gcc/glibc) or the equivalent for other
vendors.

Anyhow, try playing with gtk-config on the command line

  $ gtk-config --help
  $ gtk-config --cflags gtk+
  $ gtk-config --libs gtk+

Also, these commands can generate a lot of output and your command lines
may be too long on braindead platforms.

--
Martin


--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.



More information about the General mailing list