Wanderer Wanderer - 2 years ago 140
Linux Question

Opening Linux file on Windows

I'm learning about ray-tracing algorithms and I came across this site.
At the bottom of the page there is an available download of source code. In the tar file there is an rt file.

How do I open this file? I mean, what is it? Is it a script or a C-compiled code? Anyway, is there a way to convert this to the original source code?

Any hint appreciated, thanks in advance.

Answer Source

The file rt is a precompiled linux binary (see below). The author included all of the compilation artifacts in the tar file, along with the source.

$ tar xf rt.tar  
$ file rayt/rt 
rayt/rt: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=3b7cd05d3123da4404969eb68d76ceb2858eeedd, not stripped

You can't really do much with it, although you could look into running Ubuntu on Windows 10. It uses SDL, though, and that might not work with Microsoft's Ubuntu integration.

In that case, you might give something like virtualbox a try. You could make a Linux VM. Pick a distribution that contains SDL (CentOS 7 does.)

I was able to compile it on CentOS7 by just doing g++ *.cc -lSDL, although I had to change #include <SDL.h> to #include <SDL/SDL.h> in rt.cc.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download