How might I approach cross-platform development if I choose to develop on Linux first? [closed]

StackOverflow https://stackoverflow.com/questions/17645903

  •  03-06-2022
  •  | 
  •  

Question

I am very naive to much of computer science and would appreciate explanations or links to articles that may help in my understanding of these concepts.

If I were to develop a program in Linux, what are the portability options to Windows? How are programs compiled and run on Linux (analog to the executables on Windows)?

Are there certain libraries that are Linux-only? Surely there are, but are there instead platform independent libraries that one could use instead?

If I have a program that runs on Windows, how much more complicated is porting code, if using platform independent libraries, than copying the code over and recompiling?

Is a majority of software developed on Linux operating systems? If so, is there some advantage to this?

One of the driving reasons I am thinking of transitioning to Linux development is because of the, seemingly, simplified methods for creating GUIs with the C language. Most of the libraries I have read about for Windows get very convoluted very quickly.

Was it helpful?

Solution

This is a totally simplistic answer, but it depends on the language and libraries you use. I have created an application using the cross platform library SDL in C. SDL handled all of the low level windows and graphics functions for me. This made it easy to compile the program for a Windows, Mac, and Linux executable. I did have to actually compile the executables on the respective platforms. All applications executables, but in windows these files are all called .exe in Linux/Mac they can be called whatever you want as long as they are marked executable.

I do think most web technology is developed on Linux, but for native applications it does make sense to develop on the platform you are targeting.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top