Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizGeneral Tech Learning Aids/Tools 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
Let's say I have retrieved some
C/C++original and unmodified distribution libraries that were specifically designed for theUnix-POSIXbased environments where the original developers who designed their code wrote them specifically for their environments - systems and these libraries originally are not portable to modernWindowssystems.What I would like to be able to do is to at the least build the needed static or dynamic libraries to be able to link them against my own Visual Studio projects.
I know that with
Mingw(clang)you only need theMSVCrun-time libraries as it doesn't have any need of thePOSIXdll dependencies as it uses theWin32libraries directly. However, it doesn't have all of theUnixenvironment features thatCygwin(gcc/g++)does and for anyC/C++code that relies on nativePOSIXfunctionality such asfork(),mmap(), etc. would have to be re-implemented into theWin32equivalents for proper compilation, linking, and running of the application.With
CygwinI'm more exposed to nearly all of theUnix-POSIXfeatures with a little higher learning curve and to integrate these libraries that are built byCygwin'scompiler(s), they would rely oncygwin1.dllto be able to run on a Windows machine.A Primary Example:
The current libraries that I'm trying to build to work with
Visual StudioareGNU's:GMP,MPIR,MPFR,MPFRC++.So far I have successfully been able to build
MPIRinVisual Studio 2017with the aid ofPythonandWindowsversion ofYasm. However, when trying to buildMPFRit requires the dependency ofGMP. So now I have to buildGMP.I could use
Mingwto buildGMPwhich may be in some ways a little easier, but by usingGygwinand buildingGMPthrough theUnix/Linux/POSIXenvironment I would be exposing myself to the functionality ofUnix/POSIXsystems.Note - I'm primarily familiar with
Windowsenvironments and until recently have never worked with or on anyUnixbasedOS. So there is a bit of a learning curve for me. I'm doing all the research and reading that I can on my own which is not a problem. It provides good experience with every bit of trial and error.What I would like to know is when working on a
Windowsmachine; what would be the preferable method between the two case scenarios to buildPOSIXdesigned libraries to be able to link properly intoMSVCWindow'sbased applications? Another words, I would like to efficiently convertPOSIXspecific libraries to be able to work on my current platform or machine. Notice that I did not say that I wanted to "rewrite" the libraries to make them portable to any arbitrary environment. In this specific case I only need them to run on myWindowsenvironment. Or any other appropriate method. I will be using someCand someC++libraries to be linked into myMSVCc++17project(s). (I may also have some of the terminology wrong in some of my above statements or assumptions as I'm not familiar withUnix-POSIXenvironments).