Or is this only for cross-compiling from Mac OS to Linux?
Using these two, we can compile a program in a Mac that will run on that Linux like this:
crystal build your_program.cr --cross-compile --target "x86_64-unknown-linux-gnu"
This will generate a .o (Object file) and will print a line with a command to execute on the system we are trying to cross-compile to. For example:
cc your_program.o -o your_program -lpcre -lrt -lm -lgc -lunwind
Does the reliance on Visual Studio mean that Crystal (on Windows) cannot be used by a corporation unless the proper Visual Studio license is purchased?
2)For an “enterprise”, the visual studio license cannot be “community” unless you are developing the following:
(i) open source; (ii) Visual Studio extensions; (iii) device drivers for the Windows operating system; (iv) SQL Server development; and, (v) education purposes as permitted
One minor note: currently Crystal only supports static linking on Windows MSVC, which means LGPL components in the standard library may not be compatible with your project’s license (Big* numbers, string encoding).
Another note: while dynamic linking will be supported soon, vcruntime*.dll is not redistributable by its own and the users have to install the Visual C++ Redistributable package themselves. However this is likely to change in the future as Microsoft is in the process of open-sourcing vcruntime and vcstartup