谈一些在编译时遇见的问题与语法笔记。
Modules
In main.rs
1 | mod hello; |
In hello.rs
1 | pub fn helloworld () { } |
Error Occurs
MSYS/MINGW + cmake error
When compiling a crate using cmake:
1 | cmake -G "MSYS Makefiles" .. |
Instead of installing the cmake
package, I think you need to install mingw-w64-i686-cmake
(or the 64-bit version mingw-w64-x86_64-cmake
).
1 | pacman -S mingw-w64-x86_64-cmake |