Last active
March 5, 2021 09:32
-
-
Save AlexxIT/4cbc36ec6903b5061baf9b8aeacf7d08 to your computer and use it in GitHub Desktop.
Compile cpp for Xiaomi Gateway 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int a = 1; | |
int b = 2; | |
printf("The answer is: %d\n", a + b); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://hub.docker.com/r/dockcross/linux-mipsel | |
# https://hub.docker.com/r/asmimproved/qemu-mips | |
# TODO: change `~/projects/gw3` to your dir | |
docker run --rm -v ~/projects/gw3:/work dockcross/linux-mipsel mipsel-linux-gnu-gcc -static main.c -o main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment