Having a Windows dll, how do I build a so for Linux? [closed]











up vote
-1
down vote

favorite












EDIT:



I'm trying to help someone build his library for Linux. He has a Visual Studio project written in C++. There are a bunch of .lib files which he wants to be able to use on Linux. I opened the lib files with 7-zip and they each contain lots of dll's and .obj files. He needs to use the libraries on Linux, so he wants them as shared objects.



My question is: is there a way to convert windows libraries to Linux libraries without having the source code? And if there isn't, then is there a way to decompile the library to get the source code and then compile it for Linux?



I am sorry again if it's a stupid question. We've been struggling with this for weeks, and it's not helping that his client isn't sure what he wants either.










share|improve this question















closed as too broad by Jörg W Mittag, Tsyvarev, Rob, Billal Begueradj, lagom Nov 13 at 5:27


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • You are asking too many incomplete questions in one question. Sometimes you are saying that it is C++ project but you also say that it is Visual Basic. To build a library you need to compile the sources first and then link them into a library. First step should be to compile all sources files (cpp or cxx) using a linux C++ compiler like g++ using -c flag. Windows C++ code is sometimes not directly compileable on Linux. You need to change several functions into their Linux counterparts.
    – Kanwar Saad
    Nov 12 at 21:32










  • So if your code compiles then you are half way their. Second part is linking. If your project is not dependant heavily upon external libraries then that might be trivial task also.
    – Kanwar Saad
    Nov 12 at 21:32










  • The answers to your questions are all "no". You cannot use libraries compiled on Windows, on Linux. You cannot convert libraries compiled on Windows into Linux libraries. And you cannot "decompile" an object file or library back to source code. You have to start with the original source code, and compile it on Linux with a Linux compiler (or you could try to install a Linux cross-compiler on Windows, if you wanted to) and generate Linux-compatible libraries.
    – MadScientist
    Nov 13 at 15:15










  • I just voted to keep this closed as it remains too broad of a question even after the edits. Please take a look at what makes a question on-topic and you'll see that this question would still be right on the line even if you edited it down to a single discrete issue. You might have a better chance of getting an answer on the unix/linux stack where this would be more on-topic. However, you should expect a lot of "no, it's not possible" answers there too.
    – Graham
    Nov 13 at 15:25












  • Don't be sorry, this is not a stupid question. Might be too broad, but we'll see. Good luck with your project!
    – Josien
    Nov 13 at 16:22















up vote
-1
down vote

favorite












EDIT:



I'm trying to help someone build his library for Linux. He has a Visual Studio project written in C++. There are a bunch of .lib files which he wants to be able to use on Linux. I opened the lib files with 7-zip and they each contain lots of dll's and .obj files. He needs to use the libraries on Linux, so he wants them as shared objects.



My question is: is there a way to convert windows libraries to Linux libraries without having the source code? And if there isn't, then is there a way to decompile the library to get the source code and then compile it for Linux?



I am sorry again if it's a stupid question. We've been struggling with this for weeks, and it's not helping that his client isn't sure what he wants either.










share|improve this question















closed as too broad by Jörg W Mittag, Tsyvarev, Rob, Billal Begueradj, lagom Nov 13 at 5:27


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • You are asking too many incomplete questions in one question. Sometimes you are saying that it is C++ project but you also say that it is Visual Basic. To build a library you need to compile the sources first and then link them into a library. First step should be to compile all sources files (cpp or cxx) using a linux C++ compiler like g++ using -c flag. Windows C++ code is sometimes not directly compileable on Linux. You need to change several functions into their Linux counterparts.
    – Kanwar Saad
    Nov 12 at 21:32










  • So if your code compiles then you are half way their. Second part is linking. If your project is not dependant heavily upon external libraries then that might be trivial task also.
    – Kanwar Saad
    Nov 12 at 21:32










  • The answers to your questions are all "no". You cannot use libraries compiled on Windows, on Linux. You cannot convert libraries compiled on Windows into Linux libraries. And you cannot "decompile" an object file or library back to source code. You have to start with the original source code, and compile it on Linux with a Linux compiler (or you could try to install a Linux cross-compiler on Windows, if you wanted to) and generate Linux-compatible libraries.
    – MadScientist
    Nov 13 at 15:15










  • I just voted to keep this closed as it remains too broad of a question even after the edits. Please take a look at what makes a question on-topic and you'll see that this question would still be right on the line even if you edited it down to a single discrete issue. You might have a better chance of getting an answer on the unix/linux stack where this would be more on-topic. However, you should expect a lot of "no, it's not possible" answers there too.
    – Graham
    Nov 13 at 15:25












  • Don't be sorry, this is not a stupid question. Might be too broad, but we'll see. Good luck with your project!
    – Josien
    Nov 13 at 16:22













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











EDIT:



I'm trying to help someone build his library for Linux. He has a Visual Studio project written in C++. There are a bunch of .lib files which he wants to be able to use on Linux. I opened the lib files with 7-zip and they each contain lots of dll's and .obj files. He needs to use the libraries on Linux, so he wants them as shared objects.



My question is: is there a way to convert windows libraries to Linux libraries without having the source code? And if there isn't, then is there a way to decompile the library to get the source code and then compile it for Linux?



I am sorry again if it's a stupid question. We've been struggling with this for weeks, and it's not helping that his client isn't sure what he wants either.










share|improve this question















EDIT:



I'm trying to help someone build his library for Linux. He has a Visual Studio project written in C++. There are a bunch of .lib files which he wants to be able to use on Linux. I opened the lib files with 7-zip and they each contain lots of dll's and .obj files. He needs to use the libraries on Linux, so he wants them as shared objects.



My question is: is there a way to convert windows libraries to Linux libraries without having the source code? And if there isn't, then is there a way to decompile the library to get the source code and then compile it for Linux?



I am sorry again if it's a stupid question. We've been struggling with this for weeks, and it's not helping that his client isn't sure what he wants either.







linux dll makefile vcxproj






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 at 16:20









Josien

6,07352744




6,07352744










asked Nov 12 at 21:00









Tom K.

12




12




closed as too broad by Jörg W Mittag, Tsyvarev, Rob, Billal Begueradj, lagom Nov 13 at 5:27


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by Jörg W Mittag, Tsyvarev, Rob, Billal Begueradj, lagom Nov 13 at 5:27


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • You are asking too many incomplete questions in one question. Sometimes you are saying that it is C++ project but you also say that it is Visual Basic. To build a library you need to compile the sources first and then link them into a library. First step should be to compile all sources files (cpp or cxx) using a linux C++ compiler like g++ using -c flag. Windows C++ code is sometimes not directly compileable on Linux. You need to change several functions into their Linux counterparts.
    – Kanwar Saad
    Nov 12 at 21:32










  • So if your code compiles then you are half way their. Second part is linking. If your project is not dependant heavily upon external libraries then that might be trivial task also.
    – Kanwar Saad
    Nov 12 at 21:32










  • The answers to your questions are all "no". You cannot use libraries compiled on Windows, on Linux. You cannot convert libraries compiled on Windows into Linux libraries. And you cannot "decompile" an object file or library back to source code. You have to start with the original source code, and compile it on Linux with a Linux compiler (or you could try to install a Linux cross-compiler on Windows, if you wanted to) and generate Linux-compatible libraries.
    – MadScientist
    Nov 13 at 15:15










  • I just voted to keep this closed as it remains too broad of a question even after the edits. Please take a look at what makes a question on-topic and you'll see that this question would still be right on the line even if you edited it down to a single discrete issue. You might have a better chance of getting an answer on the unix/linux stack where this would be more on-topic. However, you should expect a lot of "no, it's not possible" answers there too.
    – Graham
    Nov 13 at 15:25












  • Don't be sorry, this is not a stupid question. Might be too broad, but we'll see. Good luck with your project!
    – Josien
    Nov 13 at 16:22


















  • You are asking too many incomplete questions in one question. Sometimes you are saying that it is C++ project but you also say that it is Visual Basic. To build a library you need to compile the sources first and then link them into a library. First step should be to compile all sources files (cpp or cxx) using a linux C++ compiler like g++ using -c flag. Windows C++ code is sometimes not directly compileable on Linux. You need to change several functions into their Linux counterparts.
    – Kanwar Saad
    Nov 12 at 21:32










  • So if your code compiles then you are half way their. Second part is linking. If your project is not dependant heavily upon external libraries then that might be trivial task also.
    – Kanwar Saad
    Nov 12 at 21:32










  • The answers to your questions are all "no". You cannot use libraries compiled on Windows, on Linux. You cannot convert libraries compiled on Windows into Linux libraries. And you cannot "decompile" an object file or library back to source code. You have to start with the original source code, and compile it on Linux with a Linux compiler (or you could try to install a Linux cross-compiler on Windows, if you wanted to) and generate Linux-compatible libraries.
    – MadScientist
    Nov 13 at 15:15










  • I just voted to keep this closed as it remains too broad of a question even after the edits. Please take a look at what makes a question on-topic and you'll see that this question would still be right on the line even if you edited it down to a single discrete issue. You might have a better chance of getting an answer on the unix/linux stack where this would be more on-topic. However, you should expect a lot of "no, it's not possible" answers there too.
    – Graham
    Nov 13 at 15:25












  • Don't be sorry, this is not a stupid question. Might be too broad, but we'll see. Good luck with your project!
    – Josien
    Nov 13 at 16:22
















You are asking too many incomplete questions in one question. Sometimes you are saying that it is C++ project but you also say that it is Visual Basic. To build a library you need to compile the sources first and then link them into a library. First step should be to compile all sources files (cpp or cxx) using a linux C++ compiler like g++ using -c flag. Windows C++ code is sometimes not directly compileable on Linux. You need to change several functions into their Linux counterparts.
– Kanwar Saad
Nov 12 at 21:32




You are asking too many incomplete questions in one question. Sometimes you are saying that it is C++ project but you also say that it is Visual Basic. To build a library you need to compile the sources first and then link them into a library. First step should be to compile all sources files (cpp or cxx) using a linux C++ compiler like g++ using -c flag. Windows C++ code is sometimes not directly compileable on Linux. You need to change several functions into their Linux counterparts.
– Kanwar Saad
Nov 12 at 21:32












So if your code compiles then you are half way their. Second part is linking. If your project is not dependant heavily upon external libraries then that might be trivial task also.
– Kanwar Saad
Nov 12 at 21:32




So if your code compiles then you are half way their. Second part is linking. If your project is not dependant heavily upon external libraries then that might be trivial task also.
– Kanwar Saad
Nov 12 at 21:32












The answers to your questions are all "no". You cannot use libraries compiled on Windows, on Linux. You cannot convert libraries compiled on Windows into Linux libraries. And you cannot "decompile" an object file or library back to source code. You have to start with the original source code, and compile it on Linux with a Linux compiler (or you could try to install a Linux cross-compiler on Windows, if you wanted to) and generate Linux-compatible libraries.
– MadScientist
Nov 13 at 15:15




The answers to your questions are all "no". You cannot use libraries compiled on Windows, on Linux. You cannot convert libraries compiled on Windows into Linux libraries. And you cannot "decompile" an object file or library back to source code. You have to start with the original source code, and compile it on Linux with a Linux compiler (or you could try to install a Linux cross-compiler on Windows, if you wanted to) and generate Linux-compatible libraries.
– MadScientist
Nov 13 at 15:15












I just voted to keep this closed as it remains too broad of a question even after the edits. Please take a look at what makes a question on-topic and you'll see that this question would still be right on the line even if you edited it down to a single discrete issue. You might have a better chance of getting an answer on the unix/linux stack where this would be more on-topic. However, you should expect a lot of "no, it's not possible" answers there too.
– Graham
Nov 13 at 15:25






I just voted to keep this closed as it remains too broad of a question even after the edits. Please take a look at what makes a question on-topic and you'll see that this question would still be right on the line even if you edited it down to a single discrete issue. You might have a better chance of getting an answer on the unix/linux stack where this would be more on-topic. However, you should expect a lot of "no, it's not possible" answers there too.
– Graham
Nov 13 at 15:25














Don't be sorry, this is not a stupid question. Might be too broad, but we'll see. Good luck with your project!
– Josien
Nov 13 at 16:22




Don't be sorry, this is not a stupid question. Might be too broad, but we'll see. Good luck with your project!
– Josien
Nov 13 at 16:22

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?