pocketlang/docs/pages/Getting-Started/build-from-source.md
Thakee Nathees 273a31e588 native types initialization & attribute getters. (#147)
getters/setters native api functions added to the
vm's configurations and native types were initialized.
2021-06-29 00:30:41 +05:30

1.3 KiB

%% Build From Source %%

%% Without a build script %%

It can be build from source easily without any dependencies, or additional requirements except for a c99 compatible compiler. It can be compiled with the following command.

GCC / MinGw / Clang (alias with gcc)

gcc -o pocket cli/*.c src/*.c -Isrc/include -lm

MSVC

cl /Fepocket cli/*.c src/*.c /Isrc/include && rm *.obj

Makefile

make

To run make file on windows with mingw, you require make and find unix tools in your path. Which you can get from msys2 or cygwin. Run set PATH=<path-to-env/usr/bin/>;%PATH% && make, this will override the system find command with unix find for the current session, and run the make script.

Windows batch script

build

You don't have to run the script from a Visual Studio .NET developer command prompt, It'll search for the MSVS installation path and setup the build environment.

For other compiler/IDE

  1. Create an empty project file / makefile.
  2. Add all C files in the src directory.
  3. Add all C files in the cli directory (NOT recursively).
  4. Add src/include to include path.
  5. Compile.

If you weren't able to compile it, please report us by opening an issue.