swapon /dev/sda2
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc proc /mnt/gentoo/proc
mount -o bind /dev/ /mnt/gentoo/dev
Once inside the chroot you need to run
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
Monday, October 11, 2010
Friday, March 26, 2010
gcc in windows (test on xp)



Warning: this is not for NooBs
Do this at your own risk.
get gcc for windows
http://gcc.gnu.org/install/binaries.html
download and install
Microsoft Windows:
* The Cygwin project;
* The MinGW project.
set the path in environmental variables:
;C:\MinGW\bin;
put c code in a folder
c:\mkdir ccode
// put this code in that folder
<> >gcc on windows (tested on windows xp)
pu c code in this folder
c:\mkdir ccode
// put this code in that folder
//start of hello world "hello.c"
#include <stdio.h>
int main (void)
{
printf ("Hello, world!\n");
return 0;
}
// end of code hello.c
to compile:
cd c:\ccode\
c:\gcc hello.c -o hello
to run
c:\hello
// here's some simple math code
//program1.c
#include <stdio.h>
#include <math.h>
int main(void)
{
printf("%.0f\n", sqrt(4));
return 0;
}
//make sure to add a new line at the end
Subscribe to:
Posts (Atom)
