Discussion:
Is it possible to convert a ".so" file to a ".a" file?
Paul Strugnell
2002-10-27 14:33:18 UTC
Permalink
Hi

I am trying to work on a University lab exercise from home, and because my
computer doesn't have Linux I am using Cygwin. The library files I have
been given are of the ".so" format, which I can't use in Windows. Can I
convert them to ".a" files? Is there any way at all to do this?

I am currently using the following command line:
gcc -I/cygdrive/c/labs/CS2021/lab1/incl -L/cygdrive/c/labs/CS2021/lab1/lib -
lm -lmbrot mandelbrot.c -o m.exe
(where mbrot refers to the shared object file "libmbrot.so" in the ...../lib
folder)

Thanks
Paul
Scott Prive
2002-10-27 17:56:26 UTC
Permalink
Paul,

I'm not sure if (or how) one might convert a .so to a .a file. You'll get other answers (I'm not one of the list experts that's for sure ;-)

But if I understand you correctly, you were given ".so" binary files. You won't be able to just take compiled Linux code and run it in Cygwin: Cygwin is not UNIX.. Cygwin is a UNIX-like wrapper around Windows. Cygwin is not an emulator for Linux binaries.

Or maybe I misunderstood.

If you have Linux binaries you want to use on a Windows PC, you can *try* re-compiling that code under Cygwin. Assuming a few things, UNIX code generally compiles under Cygwin and gives you a Windows binary.

The other thing you can try is Linux emulation under Windows. I don't know if this is the best solution for you but it will give you a true Linux sandbox to play in. If you want an emulator samdbox, try Plex86 (formerly FreeMWare):
http://savannah.nongnu.org/projects/plex86

Plex86 is a work-in-progress and I have not tried it. It is FREE and may be what you want.

Another choice is FreeMWare, which is not free and not cheap. I happen to like VMware (and have not had time to try plex86 so I don't know how the two compare).

Hope this helps,
Scott
-----Original Message-----
Sent: Sunday, October 27, 2002 9:33 AM
Subject: Is it possible to convert a ".so" file to a ".a" file?
Hi
I am trying to work on a University lab exercise from home,
and because my
computer doesn't have Linux I am using Cygwin. The library
files I have
been given are of the ".so" format, which I can't use in
Windows. Can I
convert them to ".a" files? Is there any way at all to do this?
gcc -I/cygdrive/c/labs/CS2021/lab1/incl
-L/cygdrive/c/labs/CS2021/lab1/lib -
lm -lmbrot mandelbrot.c -o m.exe
(where mbrot refers to the shared object file "libmbrot.so"
in the ...../lib
folder)
Thanks
Paul
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
Sven Köhler
2002-10-27 20:13:31 UTC
Permalink
Post by Scott Prive
But if I understand you correctly, you were given ".so" binary files.
You won't be able to just take compiled Linux code and run it in
Cygwin: Cygwin is not UNIX.. Cygwin is a UNIX-like wrapper around
Windows. Cygwin is not an emulator for Linux binaries.
Or maybe I misunderstood.
i think you didn't misunderstood him, but as an .so-file only contains
some compiled code and links to other libraries, an .so-file may be made
compatible to cygwin.
but this is to complicated, and i would recomm him, to use a remote-shell.
Max Bowsher
2002-10-27 20:35:24 UTC
Permalink
Post by Sven Köhler
Post by Scott Prive
But if I understand you correctly, you were given ".so" binary files.
You won't be able to just take compiled Linux code and run it in
Cygwin: Cygwin is not UNIX.. Cygwin is a UNIX-like wrapper around
Windows. Cygwin is not an emulator for Linux binaries.
Or maybe I misunderstood.
i think you didn't misunderstood him, but as an .so-file only contains
some compiled code and links to other libraries, an .so-file may be
made compatible to cygwin.
But not quickly, easily and without writing some custom software, surely?
Post by Sven Köhler
but this is to complicated, and i would recomm him, to use a
remote-shell.
Scott Prive
2002-10-27 21:52:00 UTC
Permalink
-----Original Message-----
Sent: Sunday, October 27, 2002 3:14 PM
Subject: Re: Is it possible to convert a ".so" file to a ".a" file?
Post by Scott Prive
But if I understand you correctly, you were given ".so"
binary files.
Post by Scott Prive
You won't be able to just take compiled Linux code and run it in
Cygwin: Cygwin is not UNIX.. Cygwin is a UNIX-like wrapper around
Windows. Cygwin is not an emulator for Linux binaries.
Or maybe I misunderstood.
i think you didn't misunderstood him, but as an .so-file only
contains
some compiled code and links to other libraries, an .so-file
may be made
compatible to cygwin.
but this is to complicated, and i would recomm him, to use a
remote-shell.
... even though the .so comes from LINUX? It's implied that's where his .so comes from.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
Scott Prive
2002-10-27 21:53:50 UTC
Permalink
This issue is or appears resolved, but "Cygwin" dropped off the Reply.
Forwarding to the group.. -Scott


-----Original Message-----
From: Paul Strugnell [mailto:***@cs.man.ac.uk]
Sent: Sunday, October 27, 2002 1:50 PM
To: Scott Prive
Subject: Re: Is it possible to convert a ".so" file to a ".a" file?


Scott,

Thanks for your speedy reply. I think I'll have to try the emulator. The only problem I have is with linking this library file - everything else is OK, but I don't have access to the source code for the library so I can't recompile it.

Once again, thank you for helping me out.

Regards
Paul



----- Original Message -----
From: "Scott Prive" <***@storigen.com>
To: "Paul Strugnell" <***@cs.man.ac.uk>; <***@cygwin.com>
Sent: Sunday, October 27, 2002 5:56 PM
Subject: RE: Is it possible to convert a ".so" file to a ".a" file?


Paul,

I'm not sure if (or how) one might convert a .so to a .a file. You'll get other answers (I'm not one of the list experts that's for sure ;-)

But if I understand you correctly, you were given ".so" binary files. You won't be able to just take compiled Linux code and run it in Cygwin: Cygwin is not UNIX.. Cygwin is a UNIX-like wrapper around Windows. Cygwin is not an emulator for Linux binaries.

Or maybe I misunderstood.

If you have Linux binaries you want to use on a Windows PC, you can *try* re-compiling that code under Cygwin. Assuming a few things, UNIX code generally compiles under Cygwin and gives you a Windows binary.

The other thing you can try is Linux emulation under Windows. I don't know if this is the best solution for you but it will give you a true Linux sandbox to play in. If you want an emulator samdbox, try Plex86 (formerly FreeMWare):
http://savannah.nongnu.org/projects/plex86

Plex86 is a work-in-progress and I have not tried it. It is FREE and may be what you want.

Another choice is FreeMWare, which is not free and not cheap. I happen to like VMware (and have not had time to try plex86 so I don't know how the two compare).

Hope this helps,
Scott
-----Original Message-----
Sent: Sunday, October 27, 2002 9:33 AM
Subject: Is it possible to convert a ".so" file to a ".a" file?
Hi
I am trying to work on a University lab exercise from home,
and because my
computer doesn't have Linux I am using Cygwin. The library
files I have
been given are of the ".so" format, which I can't use in
Windows. Can I
convert them to ".a" files? Is there any way at all to do this?
gcc -I/cygdrive/c/labs/CS2021/lab1/incl
-L/cygdrive/c/labs/CS2021/lab1/lib -
lm -lmbrot mandelbrot.c -o m.exe
(where mbrot refers to the shared object file "libmbrot.so"
in the ...../lib
folder)
Thanks
Paul
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
Loading...