Can any one of you help me in converting an windows dll file in a .so file.
Asked
Active
Viewed 3.5k times
10
-
15alas, not even Bill Gates can help you.... – Jason S Oct 29 '09 at 04:18
-
Whats special in this that even Bill Gates cant do so? – Sachin Oct 29 '09 at 04:29
-
2I have updated my answer with more links that may help you get started. Without further information from you, its the best you can hope for. – Tim Post Oct 29 '09 at 06:25
3 Answers
12
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
- 33,371
- 15
- 110
- 174
-
-
12It'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 Oct 29 '09 at 04:29
-
3@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 Oct 29 '09 at 04:44
-
-
4@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 Oct 29 '09 at 05:10
-
-
3@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 Oct 29 '09 at 06:12
1
If you don't have the source, or can't recompile, you may be able to run the code under Wine.

brianegge
- 29,240
- 13
- 74
- 99
-
6You 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 Oct 29 '09 at 09:17