Re: [Vala] Problem using Mysql in Vala (Fedora 21): /usr/bin/ld: cannot find -lmysqlclient
- From: AxP <Der_AxP t-online de>
- To: Steven Oliver <oliver steven gmail com>, tarnyko tarnyko net
- Cc: vala-list gnome org
- Subject: Re: [Vala] Problem using Mysql in Vala (Fedora 21): /usr/bin/ld: cannot find -lmysqlclient
- Date: Fri, 12 Dec 2014 17:59:42 +0100
Thanks for the answers!
@ Steven Oliver: Am I correct when I say that this solution helps to
find missing header files? I think that they are already correctly found
and the problem lies with the .so file which is not found.
@ Tarnyko: I actually searched for this file before and found it in the
//usr/lib64/mysql/ which is also shown when I use mysql_config. So this
file is /there/ but ... How would I tell valac where the file is?
This kind of stuff can be a pain.
Very true :D
Am 12.12.2014 um 17:29 schrieb Steven Oliver:
This kind of stuff can be a pain. I've found that I sometimes have to
update my c_include_path to include the new shared libraries.
Something like this:
export C_INCLUDE_PATH="/usr/include/libev"
Steven N. Oliver
On Fri, Dec 12, 2014 at 10:41 AM, Tarnyko <tarnyko tarnyko net
<mailto:tarnyko tarnyko net>> wrote:
Hi AxP,
What the message is really telling you, is that you miss the
"libmysqlclient.so" file.
This file is typically in a separate package, depending on the
distribution you are using ; in OpenSUSE for instance, it's in
"libmysqlclient-devel"
(http://rpmfind.net/linux/rpm2html/search.php?query=libmysqlclient-devel)
Hope this helps.
Regards,
Tarnyko
AxP writes:
Hello,
I tried to use MySQL today with Vala but ran into some
Problems. I searched for some solutions but couldn't fix the
issue. I saw a few threads on the list with a similar problem
but it didn't help me.
First I was trying to get
http://www.fromdual.com/mysql-vala-program-example working,
now it's only this short snippet:
using Mysql;
static int main(string[] args) {
Database mysql = new Mysql.Database();
return 0;
}
Problem is that I get this message in return:
valac "main.vala" --pkg mysql -X -lmysqlclient (im
Verzeichnis: /home/axp/Dokumente/Workspaces/10
Vala/MailServer/src)
main.vala:5.14-5.41: warning: local variable `mysql'
declared but never used
Database mysql = new Mysql.Database();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/bin/ld: cannot find -lmysqlclient
collect2: Fehler: ld gab 1 als Ende-Status zurück
error: cc exited with status 256
Compilation failed: 1 error(s), 1 warning(s)
Kompilierung fehlgeschlagen.
I think that there could be problem with my setup. I've done:
yum install mysql-server
yum install mysql-devel
So the libraries and headers are installed and new.
Compilation with valac -c "%f" --pkg mysql -X -lmysqlclient is
working.
But really creating the little program with valac "%f" --pkg
mysql -X -lmysqlclient fails.
I thought this could be a nice opportunity to try the mailing
list. I hope the problem is not too trivial and I'm the only
one who doesn't know the solution :B
Thank you in advance!
_______________________________________________
vala-list mailing list
vala-list gnome org <mailto:vala-list gnome org>
https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list gnome org <mailto:vala-list gnome org>
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]