The compiler collects and packs the codes and converts the codes into an application.
In a programming language, the compiler plays an essential role,
Because the codes themselves can not create a program, because the device only understands languages 0 and 1 (machine language).
The compiler works on the basis of the operating system, because one operating system may have used another basis to build it, for example
Linux is written with assembly and C, but from the command:
it used or Windows made of assembly and C, C ++ and C # (since 2000) from:
Must be used for display on the monitor. (Assembly language)
Because C is one of the simplest programming languages and you can connect code in a (static) library, even operating systems use C to use their operating system kernel.
The PLP language currently uses CompilerPLP on Linux (Clang and gcc), or perhaps Visual Studio on Windows.
You must first obtain the PLP language source
If you are using Linux, use the git command to get the PLP language source:
git clone https://github.com/plplanguage/PLPv1b
If you are using Windows, you can go to the links below and download the PLP language source
Github Address: https://github.com/plplanguage/PLPv1b
PLPv1b VM: https://onlinegdb.com/SyeyCgUFP
Then you have to go to the folders;
For Windows, Windows folder, and for Linux,Linux folder,and also Unix ,Unix folder for operating systems based on C (Unix), such as FreeBSD.
Now to the CompilerPLP folder
If you have a Linux operating system or a C-based operating system, write the following command:
clang++ Compile.cpp && ./a.out
If you're using Windows, open the visual studio and set your project to C++, or download clang or gcc, go to CMD, and enter the following command:
And open the program with the following command:
Why can't I use clang or gcc?
- If you are using Linux or C based operating systems, you need to get clang or gcc
For example, if you are a freebsd user and can not use clang or gcc, use the following command:
pkg install clang
or in some OS
pkg install gcc
- If you're using Windows, the codes may have been tampered with, so re-download the PLP language
Note: If you are using Visual Studio, Visual Studio may not support some of the codes, or it may give you an error report, so it's better to use clang.
- clang not work
Because you not selected Add LLVM to the system PATH for all users option.
- Some operating systems may not have clang
Some operating systems may not have clang, but if you do not have one, use gcc to compile PLP or get gcc