views:

278

answers:

3

Hello, Can any one of you help me in converting an windows dll file in a .so file.

+1  A: 

You need to recompile again into an .so file.

Andrew Keith
+5  A: 

You might try re-compiling the source code to the dll to a shared object. This may help you get started, after ensuring the code is indeed portable.

Edit:

Here is yet another link that can help guide you through the process of creating a shared library using GCC and other parts of the GNU tool chain. This link will help you to discover pitfalls that other people had when undertaking a project similar to this.

There is only so much help that can be provided for such a specific task, especially with so many unknowns. If you elect to provide more information in your question, please leave a comment.

NB: I'm pulling these links right out of Google.

Tim Post
Could you please tell me the complete procedure from the scratch
Sachin Chourasiya
It's part of a programmer's job to be able to put together the pieces of information they have to produce such a complete procedure. `tinkertim`'s link has everything specific to the build system right there for you already - if you still have problems, then your code is likely unportable, and that's a problem only you can solve.
bdonlan
@Sachin Chourasiya , I can not possibly give you detailed, step by step instructions on how to port a Windows library that I have never seen to Linux. Its your project, not mine :)
Tim Post
tinkertim, please start with your step by step instruction.
Sachin Chourasiya
@Sachin Chourasiya: you need to do some work...also, you would need to specify which platform you want to build the .so on. AFAIK, you cannot use .so files on Windows (and .dll files only appear on Windows), so you are migrating code between operating systems. That is apt to be tricky, expecially if the library makes use of Win32 APIs and not POSIX-compliant APIs.
Jonathan Leffler
I just want to migrate from Windows to Unix.
Sachin Chourasiya
@Sachin Chourasiya: You will need to study the existing library to make sure that it will 1 - compile under Linux and 2 - work as expected. I have no idea what library you are referencing, when it was written or what it does. Most importantly, I don't know _how_ it was written. Does it have a Makefile? Does the Makefile appear to be portable (or at least, is a gcc friendly Makefile included?) There are far, far, far too many unknowns for anyone here to be any more specific than we've already been. As jonathan Leffler said, you've got a bit of work in front of you.
Tim Post
A: 

If you don't have the source, or can't recompile, you may be able to run the code under Wine.

brianegge
You can't run 'just a dll' under WINE. He seems interested in porting just a library. I'm beginning to suspect that he does not have access to its source code.
Tim Post