Is it possible to compile C code for Windows under an emulated UNIX environment and then link that with Visual Studio libraries?
-
By "emulated UNIX environment", I mean the likes of Cygwin, where common GNU/BSD utilities (like make, gcc or clang, or automake/autoconf for example) can be used to compile the majority of the code. I'll suppose in this example that one big project is being built, and that it relies on a number of open source libraries. By mentioning Visual Studio, I'll also suggest that there may be a small core set of functions and methods that are very Windows-centric (platform and device specific) and that these are best written and compiled in Visual Studio. The other side of that is that the majority of code, as long as it represents pure logic or computation, might be moved to C code that would be compiled using a UNIX toolchain. The portability of Cygwin is also of interest here. For example, whether or not a user has Cygwin installed, I wonder if it is possible to simply include the Cygwin DLLs in some other self-contained directory, and let those DLLs be a prerequisite of running the resultant linked binary. The central aim is to see to what extent a Windows project can make the most use of a traditional UNIX environment, and whether this can interoperate fully with a built executable or library in Visual Studio.
-
Answer:
I think its possible. (Please correct me if I am wrong). Beacause Cygwin will convert Linux System calls to Windows calls at the end thus the DLL (not .so) should be fine with Visual Studio.
Puran Chand Rajpurohit at Quora Visit the source
Related Q & A:
- How can you change the line color in Visual Studio?Best solution by Stack Overflow
- How to Create Visual Studio 2013 Extension?Best solution by Stack Overflow
- Why doesn't ClickOnce in Visual Studio deploy content files from dependent assemblies?Best solution by Stack Overflow
- Is it possible to compile Swift for OS X 10.5?Best solution by stackoverflow.com
- In Visual Studio 2012 or 2013, how can I register a DLL file on Windows 7 64-bit computer using a Custom Action command?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.