[453_tmc] Re: Component testing documentation

  • From: "Chris Rodgers" <Rodger4@xxxxxxxxxxx>
  • To: 453_tmc@xxxxxxxxxxxxx
  • Date: Wed, 15 Oct 2008 09:13:02 -0400

Hey Logen,

Like I said in the other e-mail, that was really my first time looking at the MySQL C API.

...

I just looked up where mysql.h is, and it is possible to obtain it as an additional package in xampp (devel).

You can get both the basic and devel packages at http://www.apachefriends.org/en/xampp-windows.html#644, which we can mess with at 1:30.

For your C program, unless you dump all of the mysql headers into your header directory, you will need to specify your new directory as a path (Windows System Properties > Environment Variables > Path (system variable)). Unless... you include the files like #include "xampp/mysql/include/mysql.h" or something crazy like that.

I also don't know how you link programs using the windows compilers. Like, in gcc++, I saw this as an example: g++ bla.cpp -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient_r.

I was hoping that the "book" I sent you before would talk about everything you would need to get it up and going. I guess it's not worth buying then.

-Chris

On Wed, 15 Oct 2008 04:04:42 -0400, Logen Watkins <slapkey@xxxxxxxxx> wrote:

Sorry for my very belated response.  Swati is handling this set of
documentation, but I think that it looks good, personally.  I'm still
working on my code.  I think that I have the concurrent threads for
receiving data from the networking group (using my simulated receiveData
function) working, with data queueing occurring correctly. However linking
what I've created with the database is proving a little difficult to me.
Chris, any help? I've been looking through the documentation that you sent
to me in a previous email, and see that establishing a connection uses

static char *opt_host_name = NULL; /* server host (default=localhost) */
static char *opt_user_name = NULL; /* username (default=login name) */
static char *opt_password = NULL; /* password (default=none) */
static unsigned int opt_port_num = 0; /* port number (use built-in value) */ static char *opt_socket_name = NULL; /* socket name (use built-in value) */
static char *opt_db_name = NULL; /* database name (default=none) */

static unsigned int opt_flags = 0; /* connection flags (none) */

static MYSQL *conn;

to be used in in the

mysql_real_connect (conn, opt_host_name, opt_user_name, opt_password,
opt_db_name, opt_port_num, opt_socket_name, opt_flags)

I've read through several tutorials online but I find myself still stumped,
and my compiler still screaming at me about

unresolved external symbol _mysql_options@12 referenced in function _wmain

and such.

At our meeting tomorrow could we try to implement this?

-logen
On Sun, Oct 12, 2008 at 12:24 AM, Chris Rodgers <Rodger4@xxxxxxxxxxx> wrote:

I like it.  The graphic is pretty cool.

Logen/Swati, let us know if this is good. If it is, I'll write mine in a
similar manner.

-Chris


On Sat, 11 Oct 2008 15:59:12 -0400, <jlard@xxxxxxxxxxx> wrote:

 Does this look good enough for the report?








Other related posts: