Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
Is it possible to write a C program on Windows for Linux

I'm creating a linux shell, and i've been developing it on a VirtualBox virtual machine of linux on my windows 10 pc. Recently I've upgraded to Windows 11 and for some reason that makes the vm run at unbearably slow speeds. Therefore i how to comply and not use the linux vm, so i need to develop the shell in windows and execute it using WSL2 or any other command line. Is it possibly to use the linux libraries (e.g : <unistd.h>) on Windows?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Yes, if you setup WSL2, you should be able to develop C like you did on your VirtualBox machine. If decide to use Ubuntu, running sudo apt-get install build-essential should give you everything you need to compile and run C programs.

over 4 years ago · Santiago Trujillo Report

0

It's called cross compiling. Using WSL(2) is kind of "overkill" for just building applications, but it makes testing the result a lot easier.

If all you're after is building, but not running the resulting executables, my suggestion would be MSys2 + LLVM + Clang. The nice thing about LLVM/Clang is, that it is always a "cross"-compiler; you can compile for every supported target on every supported host. https://clang.llvm.org/docs/CrossCompilation.html

There are also Linux targeting GCC builds available in MSys2, so that's an option, too.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!