Deploying Cangjie Runtime
Cangjie executable programs depend on runtime libraries to run properly. The runtime provides core functionality such as memory management, garbage collection, and exception handling. By default, Cangjie uses dynamic linking, and the generated executable files need to load Cangjie runtime dynamic libraries at runtime.
When deploying, you need to ensure that runtime libraries exist on the target machine. On Linux, set the LD_LIBRARY_PATH environment variable to point to the runtime/lib/linux_x86_64_cjnative/ directory in the SDK; on macOS, use DYLD_LIBRARY_PATH; on Windows, add the runtime directory to PATH.
If you want to generate a self-contained executable file, you can use the --static option (Linux platform only). Static linking compiles the runtime into the binary file, eliminating the need to deploy the runtime separately in the target environment, but it will increase the file size.
Try running the program on the right to check if your runtime environment is configured correctly. If the runtime is not configured, the program will report an error indicating that the dynamic library cannot be found.