+ 2
How can I run pro*c in linux?
I would to run embedded sql. What is the requirement to using it? Can anybody help me?
16 ответов
+ 1
Hi Faizal
So, if I got your question right you would like to create and manipulate mysql database tables using embedded SQL queries in your C program, right?
Well, you can check the mysql documentation to find the functions you need.
For the code you will need to install the development package of mysql and include the header "mysql.h".
To compile your code, lets say in GNU/Linux using GCC, you can use:
$ gcc code.c -o code.exe `mysql_config --cflags --libs`
0
What is code.exe?
0
In gcc, when compiling you code, that in my example is named "code.c", you can also pass the argument -o and specify a name for the output executable, that in this case I named "code.exe" but you can give whatever name you want.
0
How if i use
proc code.pc? It will produce code.lis & code.c
0
Why you want to use proc?
0
In this case i am using firebird as mydb.
But i don't know how to connect to the db
I tried to find any reference, but it can't connect
0
Which GNU/Linux distro are you using? Ubuntu?
0
I am using debian as my OS.
0
Hi Faizal
I am setting up firebird on my GNU/Linux so that I can help you better.
Which version of firebird are you using? The 3?
0
Yes, i used version 3.0
Please help me, because it is very important for my job
0
Ok. I did some search and seems that the use of the C api is not very well documented and there is some wrappers that facilitates the task.
Do you have to use C or C++ is enough? Or do you have the possibility to choose the language?
0
I have tried to using php but my boss told me to access firebird over C and as you know that the C api is not very well documented, so it is make me confused.
0
Is it urgent? I will need to do some experiments to be sure of a suitable way of accessing firebird using the C API since I did not have to do it before.
0
It is not urgent right now, so you can do some experiment about accessing firebird over C.
actually I don't know how to CRUD over C because the source is too little
0
What you mean the code is too little?
0
Sorry, i mean is not the code but the source in google and not very well documented.
That make me confused.
I think i can't do experiment just from reading, so i need someone to tech me