Platform Question

B

Bryce Byrd

If I write a program in Ruby using opengl, sdl, and tcl/tk will the program,
with no modifications, run on both windows and linux machines?

If no, what kind of modifications am I looking at.

Thanks

Bryce Byrd
 
H

Hal Fulton

Bryce said:
If I write a program in Ruby using opengl, sdl, and tcl/tk will the program,
with no modifications, run on both windows and linux machines?

If no, what kind of modifications am I looking at.

I can only partly answer this.

First of all, Ruby and Tk seem to work the same on Linux and Windows; at
least, I have never observed any difference.

I can't speak for OpenGL and SDL. Someone else can.

However, Ruby does run differently on these platforms. For example,
Windows does not have a native fork(). If you run the Cygwin version,
you will get it emulated; most people, I think, run the "one-click"
Windows installer version, and thus simply can't call fork.

Similar restrictions exist relative to the filesystem and such. You
can't expect things like chmod to work exactly the same on Windows
(perhaps not at all; I haven't checked). Windows has the concept of
binary and text files; Linux doesn't make such a distinction. The
directory separator characters are different, but it's possible to
code around that pretty easily.

Basically Ruby interfaces well with whatever OS it's on, but doesn't
usually go out of its way to emulate others.

Hope that helps,
Hal
 
P

Paul William

If I write a program in Ruby using opengl, sdl, and tcl/tk will the program,

I know that pygame (pythons sdl bindings) run on both Linux and Windows
with no modifications. I assume the same with rubys bindings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,137
Messages
2,570,795
Members
47,342
Latest member
eixataze

Latest Threads

Top