What programing language is windows written in

What languages are Windows, Mac OS X and Linux written in?

I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI components, etc).

I assume that there are multiple languages for each and obviously I know the Linux kernel is written in C.

I’m totally guessing here that Mac OS X contains a lot of Objective-C code as it is Apple’s language derived from NeXT.

Windows, I have heard contains C, C++ and Intel Assembly. Do Linux or Mac OS contain any Assembly code?

Also, are there scripting languages like Ruby, Python, etc used by the OS developers for scripting parts of the OS? What parts of the OS would be written in each language?

14 Answers 14

  • Windows: C++, kernel is in C
  • Mac: Objective C, kernel is in C (IO PnP subsystem is Embedded C++)
  • Linux: Most things are in C, many userland apps are in Python, KDE is all C++

All kernels will use some assembly code as well.

Linux: C. Some parts in assembly.

[. ] It’s mostly in C, but most people wouldn’t call what I write C. It uses every conceivable feature of the 386 I could find, as it was also a project to teach me about the 386. As already mentioned, it uses a MMU, for both paging (not to disk yet) and segmentation. It’s the segmentation that makes it REALLY 386 dependent (every task has a 64Mb segment for code & data — max 64 tasks in 4Gb. Anybody who needs more than 64Mb/task — tough cookies). [. ] Some of my «C»-files (specifically mm.c) are almost as much assembler as C. [. ] Unlike minix, I also happen to LIKE interrupts, so interrupts are handled without trying to hide the reason behind them. (Source)

Mac OS X: Cocoa mostly in Objective-C. Kernel written in C, some parts in assembly.

Mac OS X, at the kernel layer, is mostly an older, free operating system called BSD (specifically, it’s Darwin, a sort of hybrid of BSD, Mach, and a few other things). almost entirely C, with a bit of assembler thrown in. (Source)

Much of Cocoa is implemented in Objective-C, an object-oriented language that is compiled to run at incredible speed, yet employes a truly dynamic runtime making it uniquely flexible. Because Objective-C is a superset of C, it is easy to mix C and even C++ into your Cocoa applications. (Source)

Windows: C, C++, C#. Some parts in assembler.

We use almost entirely C, C++, and C# for Windows. Some areas of code are hand tuned/hand written assembly. (Source)

How do I find out what programming language a specific piece of software is written in?

Whether I’m using a freeware countdown timer, a utorrent client, video player, etc. is there an easy way to find out what programming language it is written in? Especially if it is one of the more mainstream programming languages such as C, C++, Java, Perl, Basic, etc.

Читайте также:  Ipconfig не видит сетевой адаптер windows

I’m familiar with PHP and JavaScript for web use and have no trouble opening and editing those files, but now that I’m looking to pick up a non-web programming language, I would like to increase the scope of my skills a bit. I’m having a bit of difficulty finding out what language the various applications I personally use were written in. I would like to compare languages with real-life examples that I’m familiar with.

2 Answers 2

Examining the list of shared libraries (DLLs in Windows-speak) of a compiled program can give a clue, because typically each language has a specific distinctive library to provide the runtime environment.

For example, on my Linux PC, running the ldd command on an executable produced the following tell-tale output:

The use of libc.so suggests C or C++. The use of libstdc++.so suggests C++. In fact that was a C++ program.

Searching the program executable for human readable strings can also given clues, especially if it has debugging information present.

For example, running the strings command on that same executable revealled (among much other text) the following tell-tale strings:

The first three look like fragments of C++, the last looks like the name of a C++ source code file.

I’d say that nowadays, most common programming languages used for desktop applications would be C++, .Net and Java (don’t know about apps on Macs).

I think the thing to consider is more what you want to achieve and on which plateforms you want it to run. Java will give you all platforms for free, provided the user has a JVM on his computer. .Net will make it easy to develop for Windows but requires tools from Microsoft sometimes having a free but limiting license but usually expensive. C++ will allow you to develop for multiple platforms but involves more effort to make your program portable and to compile it for several OS/processors.

To identify .Net or Java programs, simply read the README file provided with the program. I will state that you need a certain version of the .Net framework or of a Java Virtual Machine to run the program.

Also check if the program is simply a script, if it needs an interpreter (PHP, LUA, Python, . ). That should also be mentionned in the README file.

Harder will be to distinguish between C and C++. Both get compiled to an EXE file and do not require any kind of external virtual machine to run.

What language are most mainstream Windows GUI programs written in? [closed]

Want to improve this question? Update the question so it’s on-topic for Stack Overflow.

Closed 8 years ago .

I’m curious to find out what most Windows GUI programs are written in — for example, AOL Instant Messenger, Microsoft Word, Notepad, other popular shareware programs, etc.

6 Answers 6

Older programs are typically written in Visual C++, usually on top of a framework like MFC. (Unless the program was written by Microsoft, who practically never use MFC. :)) Visual Basic was also very common for internal or amateur applications, but not for the well-known «mainstream» ones.

Newer programs are usually written on the .NET platform, so in C# or VB.NET.

Depends on the OS, and what the program’s domain is. If it is an version of windows that can support .NET then many of the applications are written in .NET, due to the features that are afforded to the developers. If an application is for an older platform, uses intense graphics, or is build for pure performance, over appearence, more than likely it is in C++.

Читайте также:  Как скрыть резервный диск windows

MFC which basically means C++.

Although I would suspect many windows program with old origins have rolled their own framework on directly on top of win32 or uses it directly and might still be mostly C.

Look at MS visual studio, it comes with a nice interface and is easy to use library for GUI development. There are several popular popular libraries for GUI development. Most of them have bindings for multiple languages, but I would agree with the above C++ is the most used.

10 years ago the answer was C++ far and away and probably Visual Basic in the #2 spot. Today C++ still dominates but C# is getting an increasing market share for new projects. A lot of the big-time apps have been around for a while, though, and they were and continue to be written in C++.

Edit: Another common language/framework that you see around a lot without realizing it is Delphi.

Most modern desktop programs are written in C++.

Find Programming Language Used

Whats the easiest way to find out what programming language an application was written in? I would like to know if its vb or c++ or delphi or .net etc from the program exe file.

13 Answers 13

of course if they used a packer, some unpacking will need to be done first 🙂

Start it up and check what run-time DLLs it uses with Process Explorer.

If that doesn’t make it immediately obvious, search the web for references to those DLLs.

Most disassemblers (including Olly I think) can easily show you the text contained in an EXE or DLL, and that can also sometimes give a clue. Delphi types are often prefixed with T as in TMyClass.

If it’s a small executable with no DLL references and no text you might be SOL. At that point you’d need to look for idioms of particular compilers, and it would be mostly guesswork.

There is an art to detecting what language a program was written in. It is possible but there are no hard and fast rules. It takes a lot of experience (and it also leads to the question «Why would you want to. » but here are a few ideas on how to go about it.

What you’re looking for is a «signature». The signature could be a certain string that is included by the compiler, a reference to an API that is quite common in the programming tool being used, or even a style of programing that is common to the tools being used, visible in the strings contained in the application.

In addition, there are styles to how an application is deployed: various configuration files found in the deployment directory, dlls and assemblies and even images, directories or icons.

Java applications wrapped in a self-launching executable will contain references to java libs, and will likely have certain libraries or files included in the same directory that indicate that it’s java.

As indicated in other answers a managed assembly will show certain signs as well: you can open it in Reflector etc. While it is correct that c# and VB are «interchangable» once compiled, it is not true that they are identical. If you use Reflector to disassemble VB code you will quite often see that the assembly references the Microsoft.VisualBasic.dll assembly. You’ll be able to tell the difference between Mono applications because they will most likely contain references to the mono assemblies.

Читайте также:  Apple mac and linux

Many compilers assemble and link code in certain ways, and leave footprints behind. For example, examining a window executable using «strings: tab in Process Explorer, you’ll see a lot of strings. Using these you may be able to determine programming styles, methods called, error or trace methods withint the exe.

An example is that compilers use different mechanisms for localization: Microsoft stores localized strings in XML files or resource files. Other compilers will use a different tactic.

Another example is c++ name mangling. The CodeWarrior compiler uses a different algorithm to mangle the names of the member variables and functions of a call than Visual Studio.

I suppose you could write a book on the subject of accurately determining the lineage of any executable. This subject would probably be called «programming archeology».

What language are most mainstream Windows GUI programs written in? [closed]

Want to improve this question? Update the question so it’s on-topic for Stack Overflow.

Closed 8 years ago .

I’m curious to find out what most Windows GUI programs are written in — for example, AOL Instant Messenger, Microsoft Word, Notepad, other popular shareware programs, etc.

6 Answers 6

Older programs are typically written in Visual C++, usually on top of a framework like MFC. (Unless the program was written by Microsoft, who practically never use MFC. :)) Visual Basic was also very common for internal or amateur applications, but not for the well-known «mainstream» ones.

Newer programs are usually written on the .NET platform, so in C# or VB.NET.

Depends on the OS, and what the program’s domain is. If it is an version of windows that can support .NET then many of the applications are written in .NET, due to the features that are afforded to the developers. If an application is for an older platform, uses intense graphics, or is build for pure performance, over appearence, more than likely it is in C++.

MFC which basically means C++.

Although I would suspect many windows program with old origins have rolled their own framework on directly on top of win32 or uses it directly and might still be mostly C.

Look at MS visual studio, it comes with a nice interface and is easy to use library for GUI development. There are several popular popular libraries for GUI development. Most of them have bindings for multiple languages, but I would agree with the above C++ is the most used.

10 years ago the answer was C++ far and away and probably Visual Basic in the #2 spot. Today C++ still dominates but C# is getting an increasing market share for new projects. A lot of the big-time apps have been around for a while, though, and they were and continue to be written in C++.

Edit: Another common language/framework that you see around a lot without realizing it is Delphi.

Most modern desktop programs are written in C++.

Оцените статью