[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: MySQL.h
From: MET <met () uberstats ! com>
Date: 2002-11-26 0:49:39
[Download RAW message or body]
> On Monday 25 November 2002 03:14 pm, MET wrote:
> > On Monday 25 November 2002 4:38 am, Jonas C. Drewsen wrote:
> > > On Mon, 2002-11-25 at 09:10, MET wrote:
> > > > On Sunday 24 November 2002 10:05 pm, Jason Mott wrote:
> > > > > You can use the --with-extra-includes=DIR and
> > > > > --with-extra-libs=DIR options with the configure script. Either add
> > > > > them when prompted after running Build->Configure or you can set
> > > > > configure options in Project->Options (select "Compiler Options"
> > > > > and then the "configure" tab).
> > > >
> > > > It appears I don't completely have this working. After fixing my
> > > > last error I'm getting errors about "undefined reference to
> > > > 'mysql_connect'" and the rest of the mysql functions. This occurs
> > > > during
> > > > compile/execute. I've done:
> > > >
> > > > --with-extra-includes=/usr/include/mysql/
> > > > --with-extra-libs=/usr/lib/mysql/
> > > >
> > > > These two folders hold everything according to the path's listing in
> > > > the mysql-devel.rpm. Basically what I'm asking is this: Is there
> > > > anything else that I might be missing? Do I have to specificy the
> > > > *.so files held in /usr/lib/mysql/ directly?
> > >
> > > Somewhere in the Project->Options dialog you should tell the linker to
> > > link with the mysqlclient library. Probably something like
> > > -lmysqlclient
> >
> > This sounds exactly like what I'm looking for, but since I'm brand new to
> > compiling under *nix I have no idea exactly how to implement that. I
> > come from MS Visual Studio which makes this a bit easier, but as a result
> > hides the actual compile lines from the user. So any help would be
> > greatly appreciated. I currently only have the two --with lines as
> > stated above.
>
> Did you get this working? Because I see your headers and libraries are in
> standard places, so you shouldn't even need to specify those locations. All
> you need to do is specify the library itself. I don't know the names of the
> libraries in question, but here is the rule: take the name of the library
> file, remove the lib in the beginning of the name, remove everything after
> the first dot, prepend -l and add the string to Projects->Options->Linker
> Options->additional libraries.
I've now got it working, thank you very much. I had the
--with-extra-libs/includes correctly, but I was missing the additional
libraries inside of Linker Options. I just added -lmysqlclient following
your guidelines and it worked. Once again, thanks a lot.
~ Matthew
>
> For example, if your library is named libmysql.so, then you'd add -lmysql
> to the field.
>
> > Thanks in advance,
> >
> > ~ Matthew
> >
> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> > >> unsubscribe <<
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic