The compiler collects a codes that collects and packs the codes, turning the codes into a program.
A compiler programming language plays a key role,
because the codes themselves cannot create a program because the machine only understands languages 0 and 1.
The compiler works based on the operating system, because an operating system may have used another basis for its construction, for example,
Linux is written with assembly and C, but from the command:
Should be used either in Windows with assembly and C and C++ and C# (since 2000) but from:
Must be used for display on the monitor.(Assembly Language)
Because C is one of the simplest programming languages and you can connect the codes in a library (static), that’s why even operating systems use C to use the core of their operating system.
PLP currently uses CompilerPLP on Linux, and clang or maybe 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
Then you have to go to the folders;
For Windows, Windows folder, and for Linux, Linux folder for operating systems based on C folder 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, go to CMD, and enter the following command:
And open the program with the following command:
Why can’t I use clang?
- If you are using Linux or C-based operating systems, you need to get clang
For example, if you are a freebsd user and can’t use clang, use the
pkg install clang command
- 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.
- why clang not work?
because you not selected Add LLVM to the system PATH for all users option.
- Some operating systems may not have clang
They may not have it, but if you don’t have it, use gcc to compile PLP or get gcc