Hello, Can any one of you help me in converting an windows dll file in a .so file.
+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
2009-10-29 04:21:27
Could you please tell me the complete procedure from the scratch
Sachin Chourasiya
2009-10-29 04:25:36
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
2009-10-29 04:29:15
@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
2009-10-29 04:44:25
tinkertim, please start with your step by step instruction.
Sachin Chourasiya
2009-10-29 04:55:16
@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
2009-10-29 05:10:17
I just want to migrate from Windows to Unix.
Sachin Chourasiya
2009-10-29 05:43:19
@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
2009-10-29 06:12:39
A:
If you don't have the source, or can't recompile, you may be able to run the code under Wine.
brianegge
2009-10-29 06:25:45
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
2009-10-29 09:17:05