Re: [gtk-list] Re: Unidentified subject!



As the well known Erik Mouw said...
->3. Instead of using normal quotes ('), use _back_ quotes (`):
->         gcc -o code code.c `gtk-config --cflags --libs`
->                            ^                          ^
->                            |                          |
->   These are backquotes! ---+--------------------------+

	I think it's time to put this in a new faq entry, since
	most of the beginners do the same error. Mr Froyd, Gale
	and Amundson, do you think it is a good idea ? :)

--[patch begins]--
--- gtkfaq.sgml.old     Fri May  7 16:07:36 1999
+++ gtkfaq.sgml Fri May  7 16:25:58 1999
@@ -268,6 +268,27 @@
 </itemize>
 
 <!-- ----------------------------------------------------------------- -->
+<sect1>When compiling programs with GTK+, I get compiler error messages about not being able to find <tt/gtk-config/.
+
+<p> When compiling programs with GTK+, the <tt/gtk-config/ script 
+give you an easy way to get informations such as pathes to
+libraries and C header files. In order to use it correctly, you
+must enclose the <tt/gtk-config/ part of your command line in
+backquotes (`) instead of quotes ('). If you use quotes, your
+compiler will probably fail with (assuming your compiler is gcc)
+
+<tscreen><verb>
+$ gcc -o prg prg.c 'gtk-config --cflags --libs'
+gcc: gtk-config --cflags --libs: No such file or directory
+</verb></tscreen>
+
+Using backquotes will give you the expected results :
+
+<tscreen><verb>
+$ gcc -o prg prg.c `gtk-config --cflags --libs`
+</verb></tscreen>
+
+<!-- ----------------------------------------------------------------- -->
 <sect1>When compiling programs with GTK+, I get compiler error messages about not being able to find <tt/"glibconfig.h"/.
 
 <p> The header file "glibconfig.h" was moved to the directory
--[patch ends]--

->
->
->Erik
->
->-- 
->J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
->of Electrical Engineering, Faculty of Information Technology and Systems,
->Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
->Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
->WWW: http://www-ict.its.tudelft.nl/~erik/


-- 
__________________________________________________________________________
   Emmanuel DELOGET [pixel] pixel@{dotcom.fr,epita.fr}  ----  DotCom SA
         http://www.epita.fr/~pixel | http://www.dotcom.fr/~pixel
"On the last day, God created Linux. And Microsoft won its antitrust case"
--------------------------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]