How to test your code on a machine with big-endian architecture 如何在大端机器上测试你的代码
How to test your code on a machine with big-endian architecture
sudo apt-get install gcc-multilib-mips-linux-gnu gcc-mips-linux-gnu qemu-user
sudo apt-get install g++-multilib-mips-linux-gnu g++-mips-linux-gnu
and then
mips-linux-gnu-gcc -g -o test -static test.c
mips-linux-gnu-g++ -g -o a.out -static test.cpp
qemu-mips ./test
+V why_null 请备注:from博客园