Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSQL in Windows and Ruby

Status
Not open for further replies.

bjack

Technical User
Oct 17, 2001
2
US
I am begining to experiment learning the Ruby programming language. However! the mySQL library needs to be 'made' at a linux command prompt. Why? Isn't the mysql.o that it uses just an include file and not a binary? Is there any way to properly re-create this include file so I can use it in Windows?

There is a collection of files as follows:
00connect.rb
10create_db.rb
20create_table.rb
30insert.rb
40select.rb
50update.rb
60drop_table.rb
70drop_db.rb
depend
extconf.rb(the make file)
manifest
mysql.c(unesisary for this I think just there to be there)
mysql-compat.rb
test.rb

Do I simply have one main include file that includes all of the .rb files? I know that php requires no difference in coding if sql is under Windows.

Sorry if i'm too much of a newbie :)

Thanks!

-Bryan
 
I take that back. the mysql.c looks to be the actuall source file. and the rest are example files. Now to find a copy of mysql.h...

Here is a copy of the make file
require 'mkmf'
MYSQLDIR = "/usr/local"
$CFLAGS = "-I#{MYSQLDIR}/include"
$LDFLAGS = "-L#{MYSQLDIR}/lib/mysql"
$libs = "-lmysqlclient"
create_makefile("mysql")

I understand where it needs the include file etc, but, is there anything else I may need when compiling this for windows?

Thanks again :)

-Bryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top