Re: [Vala] [Solved] 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] [Solved] Problem using Mysql in Vala (Fedora 21): /usr/bin/ld: cannot find -lmysqlclient
- Date: Fri, 12 Dec 2014 21:35:09 +0100
Hello folks,
thanks again for your input! I think I solved the problem! I'm new to
Vala so I didn't think too much about searching for C tutorials and
help-documents but after a little "groceries pause" I thought of looking
after how *.so actually work with gcc. Should have done that before but
looking on the bright side I now know that its not that bad to use this
list :P
So, the solution was:
Compiling: valac -c --pkg mysql "%f"
Building: valac --pkg mysql "%f" -X -L/usr/lib64/mysql -X -lmysqlclient
I /think/ I tried using -L before but it seems I made some mistake.
After the build of the snippet worked I tried to build the complete
example and it actually worked! /But/ I got some minor notice:
valac --pkg mysql "main.vala" -X -L/usr/lib64/mysql -X -lmysqlclient
(im Verzeichnis: /home/axp/Dokumente/Workspaces/10 Vala/MailServer/src)
/mnt/0AD4B7C55DDA55C5/Daten/Workspaces/10
Vala/MailServer/src/main.vala.c: In Funktion »_vala_main«:
/mnt/0AD4B7C55DDA55C5/Daten/Workspaces/10
Vala/MailServer/src/main.vala.c:135:10: Warnung: Zuweisung erzeugt
Ganzzahl von Zeiger ohne Typkonvertierung
_tmp13_ = mysql_real_connect (_tmp5_, _tmp6_, _tmp7_, _tmp8_,
_tmp9_, (guint) _tmp10_, _tmp11_, _tmp12_);
^
Kompilierung erfolgreich beendet.
Doesn't seem to hurt :| Probably some of these c-compiler warnings you
should ignore, right?
So I tried the program and got:
ERROR 2003: Connection failed: Can't connect to MySQL server on
'127.0.0.1' (111 "Connection refused")
Very nice! The program is semi-working! Now I have to figure some
SQL-Stuff out, but that should be possible ;)
Thanks again! I will probably write again some time with something more
interesting!
AxP
Am 12.12.2014 um 19:22 schrieb Steven Oliver:
Steven N. Oliver
On Fri, Dec 12, 2014 at 11:59 AM, AxP <Der_AxP t-online de
<mailto:Der_AxP t-online de>> wrote:
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.
Yes. My bad.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]