[Glade-users] Basic Newbie question



Hello B

The FAQ on adding libraries was confusing, so this is what I did: 
1. edit projects/something/src/Makefile.am 
2. execute projects/something/autogen.sh 
3. make 
My makefile.am looks like this: 
## Process this file with automake to produce Makefile.in 

## TO integrate MYSQL library 
## add the path to MYSQL so make can find it: 
MYSQLPATH=/usr 

## Replace the original INCLUDES WITH THE ONE BELOW 
##INCLUDES = \ 
## -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ 
## -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ 
## @PACKAGE_CFLAGS@ 
## 
## TO integrate MYSQL 
## replace the INCLUDES def with the following: 
INCLUDES = \ 
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \ 
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ 
@PACKAGE_CFLAGS@ \ 
-I$(MYSQLPATH)/include/mysql 

bin_PROGRAMS = ssarts 

ssarts_SOURCES = \ 
main.c \ 
support.c support.h \ 
interface.c interface.h \ 
ssarts_support.c ssarts_support.h \ 
mysql_stuff.c mysql_stuff.h \ 
callbacks.c callbacks.h 

## Replace the original def of somethin_LDADD 
##ssarts_LDADD = @PACKAGE_LIBS@ 
## 
## TO integrate MYSQL using static libs 
## define ssarts_LDADD as follows: 
## 
##ssarts_LDADD = @PACKAGE_LIBS@ \ 
##-lz ${MYSQLPATH}/lib/mysql/libmysqlclient.a 
## 
## TO integrate MYSQL using dynamic libs 
## define ssarts_LDADD as follows: 
## 
ssarts_LDADD = @PACKAGE_LIBS@ \ 
-L${MYSQLPATH}/lib/mysql -lmysqlclient 


Good luck, 
O
On Thu, 16 Oct 2003 15:21:35 -0700 Brent Clements <bclem rice edu> wrote:
This may or may not be relative to Glade but I thought I'd ask you
guys
since I"m using glade to develop my gui's.

Ok, I have written a my-sql.c and my-sql.h file that contains my
functions for performing mysql operations.

A few questions.

What do I change in order to compile this into my application when
I run
make?

What do I change in order for configure to automatically search
for the
mysql libraries. I don't want my user to have to specify any
environmental variables such as CFLAGS and LDFLAGS when they run
configure


Please don't flame me for the simple questions. I'm trying to learn.
:-)
to program in c again.

Thanks,
Brent Clements

_______________________________________________
Glade-users maillist  -  Glade-users lists ximian com
http://lists.ximian.com/mailman/listinfo/glade-users





Concerned about your privacy? Follow this link to get
FREE encrypted email: https://www.hushmail.com/?l=2

Free, ultra-private instant messaging with Hush Messenger
https://www.hushmail.com/services.php?subloc=messenger&l=434

Promote security and make money with the Hushmail Affiliate Program: 
https://www.hushmail.com/about.php?subloc=affiliate&l=427




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