- White_Shroud:
- Posts : 5
Points : 2420
Reputation : 1
Join date : 2017-10-04
Age : 27
Location : Albania
Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 3:30 pm
I was trying to run a program, but I got errors in directories ( that's what I think )
here's what I receive:
here's what I receive:
- Code:
gcc: error: Usage:: No such file or directory
gcc: error: [OPTIONS]: No such file or directory
gcc: error: Options:: No such file or directory
gcc: error: [-I/usr/include/mysql: No such file or directory
gcc: error: [-I/usr/include/mysql: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: [/usr/lib/mysql/plugin]: No such file or directory
gcc: error: [/var/run/mysqld/mysqld.sock]: No such file or directory
gcc: error: [0]: No such file or directory
gcc: error: [5.7.13]: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: VAR: No such file or directory
gcc: error: is: No such file or directory
gcc: error: one: No such file or directory
gcc: error: of:: No such file or directory
gcc: error: pkgincludedir: No such file or directory
gcc: error: [/usr/include/mysql]: No such file or directory
gcc: error: pkglibdir: No such file or directory
gcc: error: [/usr/lib/x86_64-linux-gnu]: No such file or directory
gcc: error: plugindir: No such file or directory
gcc: error: [/usr/lib/mysql/plugin]: No such file or directory
gcc: error: unrecognized command line option ‘--cflags’
gcc: error: unrecognized command line option ‘-fno-omit-frame-pointer]’
gcc: error: unrecognized command line option ‘--cxxflags’
gcc: error: unrecognized command line option ‘-fno-omit-frame-pointer]’
gcc: error: unrecognized command line option ‘--libs’
gcc: error: unrecognized command line option ‘--libs_r’
gcc: error: unrecognized command line option ‘--plugindir’
gcc: error: unrecognized command line option ‘--socket’
gcc: error: unrecognized command line option ‘--port’
gcc: error: unrecognized command line option ‘--libmysqld-libs’
gcc: error: unrecognized command line option ‘--variable=VAR’
Re: Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 3:51 pm
Welcome to the forum !!!White_Shroud wrote:I was trying to run a program, but I got errors in directories ( that's what I think )
here's what I receive:
- Code:
gcc: error: Usage:: No such file or directory
gcc: error: [OPTIONS]: No such file or directory
gcc: error: Options:: No such file or directory
gcc: error: [-I/usr/include/mysql: No such file or directory
gcc: error: [-I/usr/include/mysql: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: [/usr/lib/mysql/plugin]: No such file or directory
gcc: error: [/var/run/mysqld/mysqld.sock]: No such file or directory
gcc: error: [0]: No such file or directory
gcc: error: [5.7.13]: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: VAR: No such file or directory
gcc: error: is: No such file or directory
gcc: error: one: No such file or directory
gcc: error: of:: No such file or directory
gcc: error: pkgincludedir: No such file or directory
gcc: error: [/usr/include/mysql]: No such file or directory
gcc: error: pkglibdir: No such file or directory
gcc: error: [/usr/lib/x86_64-linux-gnu]: No such file or directory
gcc: error: plugindir: No such file or directory
gcc: error: [/usr/lib/mysql/plugin]: No such file or directory
gcc: error: unrecognized command line option ‘--cflags’
gcc: error: unrecognized command line option ‘-fno-omit-frame-pointer]’
gcc: error: unrecognized command line option ‘--cxxflags’
gcc: error: unrecognized command line option ‘-fno-omit-frame-pointer]’
gcc: error: unrecognized command line option ‘--libs’
gcc: error: unrecognized command line option ‘--libs_r’
gcc: error: unrecognized command line option ‘--plugindir’
gcc: error: unrecognized command line option ‘--socket’
gcc: error: unrecognized command line option ‘--port’
gcc: error: unrecognized command line option ‘--libmysqld-libs’
gcc: error: unrecognized command line option ‘--variable=VAR’
Well, have you installed all the libs ?
and I need to know the OS you are using, its Windows ?
- White_Shroud:
- Posts : 5
Points : 2420
Reputation : 1
Join date : 2017-10-04
Age : 27
Location : Albania
Re: Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 3:53 pm
Renan Araújo wrote:Welcome to the forum !!!White_Shroud wrote:I was trying to run a program, but I got errors in directories ( that's what I think )
here's what I receive:
- Code:
gcc: error: Usage:: No such file or directory
gcc: error: [OPTIONS]: No such file or directory
gcc: error: Options:: No such file or directory
gcc: error: [-I/usr/include/mysql: No such file or directory
gcc: error: [-I/usr/include/mysql: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: [/usr/lib/mysql/plugin]: No such file or directory
gcc: error: [/var/run/mysqld/mysqld.sock]: No such file or directory
gcc: error: [0]: No such file or directory
gcc: error: [5.7.13]: No such file or directory
gcc: error: [-L/usr/lib/x86_64-linux-gnu: No such file or directory
gcc: error: VAR: No such file or directory
gcc: error: is: No such file or directory
gcc: error: one: No such file or directory
gcc: error: of:: No such file or directory
gcc: error: pkgincludedir: No such file or directory
gcc: error: [/usr/include/mysql]: No such file or directory
gcc: error: pkglibdir: No such file or directory
gcc: error: [/usr/lib/x86_64-linux-gnu]: No such file or directory
gcc: error: plugindir: No such file or directory
gcc: error: [/usr/lib/mysql/plugin]: No such file or directory
gcc: error: unrecognized command line option ‘--cflags’
gcc: error: unrecognized command line option ‘-fno-omit-frame-pointer]’
gcc: error: unrecognized command line option ‘--cxxflags’
gcc: error: unrecognized command line option ‘-fno-omit-frame-pointer]’
gcc: error: unrecognized command line option ‘--libs’
gcc: error: unrecognized command line option ‘--libs_r’
gcc: error: unrecognized command line option ‘--plugindir’
gcc: error: unrecognized command line option ‘--socket’
gcc: error: unrecognized command line option ‘--port’
gcc: error: unrecognized command line option ‘--libmysqld-libs’
gcc: error: unrecognized command line option ‘--variable=VAR’
Well, have you installed all the libs ?
and I need to know the OS you are using, its Windows ?
I am using Ubuntu
Re: Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 3:54 pm
So, just type: apt-get install libmysqlclient-dev
And see if it help you
And see if it help you
- White_Shroud:
- Posts : 5
Points : 2420
Reputation : 1
Join date : 2017-10-04
Age : 27
Location : Albania
Re: Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 3:56 pm
Renan Araújo wrote:So, just type: apt-get install libmysqlclient-dev
And see if it help you
same thing here, it did not help
- Joao:
- Posts : 12
Points : 2437
Reputation : 4
Join date : 2017-10-03
Re: Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 4:11 pm
@White_Shroud,
the problem seems to be due to an error on the command line, check if you typed it all right:
the problem seems to be due to an error on the command line, check if you typed it all right:
- Code:
~$gcc teste.c -o teste $(mysql_config --libs)
~$~sudo apt-get install mysql-server mysql-client
and after, as Renan said:
apt-get install libmysqlclient-dev
- White_Shroud:
- Posts : 5
Points : 2420
Reputation : 1
Join date : 2017-10-04
Age : 27
Location : Albania
Re: Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 4:15 pm
Joao wrote:@White_Shroud,
the problem seems to be due to an error on the command line, check if you typed it all right:
- Code:
~$gcc test.c -o test $(mysql_config --libs)
~$~sudo apt-get install mysql-server mysql-client
and after, as Renan said:
apt-get install libmysqlclient-dev
AAAAAAAAAAAAAAAH man, thanks a lot !!!!!!!!!!
I typed -libs
thanks again dude ! Thumbs UP
Re: Why am I having troubles when trying to use MySQL with C - (Locked)
Wed Oct 04, 2017 4:19 pm
As the problem was solved, topic will be locked, reopened if the author wish
Permissions in this forum:
You cannot reply to topics in this forum
|
|