Compiling the Program

only for RuBoard - do not distribute or recompile

Compiling the Program

Listing 7.19 is the file used to compile this program. If you get it from the companion Web site, it will be called build.sh. To compile, at the command line send

 % ./build.sh 
Listing 7.19 File build.sh contents: The Commands Used to Compile the SESI Order Application
 01 clear  02  03 gcc -Wall -g -o sesi_order.exe callbacks.c interface.c \  04              support.c   main.c  sesi_utils.c \  05     `gtk-config --cflags --libs` \  06     -I/usr/include/mysql \  07     -L/usr/lib/mysql -lmysqlclient -lm -lz 

Line 1 simply clears the screen; this makes it more readable if any compile errors occur. Lines 3 and 4 are the compile commands and the target files; the backslash character (\) is the line-continuation character.

Line 5 sets the GTK+ flags and libraries. (Don t forget that those are back-tick marks, not single quotation marks.) Line 6 includes the MySQL library, whereas line 7 links the MySQL, math, and zlib libraries.

only for RuBoard - do not distribute or recompile


MySQL Building User Interfaces
MySQL: Building User Interfaces (Landmark)
ISBN: 073571049X
EAN: 2147483647
Year: 2001
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net