Popular Posts
-
I saw this link posted by a friend, and I followed it. I'm posting it here because it is very realistic and happens to anyone working in...
-
http://healthcareitnews.eu/content/view/1068/43/
-
Today is my lucky day :) I found two free books about Qt and Design Patterns. The first book is C++ GUI Programming with Qt 4 The first edit...
Thursday, April 17, 2008
Name Mangling
Did you ever hear about Name Mangling? I didn't myself! But it is important to take a look at :)
Sunday, April 13, 2008
Cross Compiling the hard way...
This tutorial contains many hints about cross compiling. You'll never need to understand all this stuff, but it is worth reading anyway! In practice, cross compilers are already built and you'll just use them!
http://www.landley.net/ols/ols2007/tutorial.txt
http://www.landley.net/ols/ols2007/tutorial.txt
Predefined Macros in gcc
From the gcc man page:
-dCHARS
CHARS is a sequence of one or more of the following characters, and must not be preceded by a space. Other characters are interpreted by the compiler proper, or reserved for future versions of GCC, and so are silently ignored. If you specify characters whose behavior conflicts, the result is undefined.
M Instead of the normal output, generate a list of #define directives for all the macros defined during the execution of the preprocessor, including predefined macros. This gives you a way of finding out what is predefined in your version of the preprocessor. Assuming you have no file foo.h, the commandtouch foo.h; cpp -dM foo.h
will show all the predefined macros.
Compiling 32-bit Applications on 64-bit Linux Hosts
You need to install the gcc-mutlilib package. Then:
$ gcc -o hello -m32 hello.c
the -m32 flag tells the compiler to target the 32-bit architecture instead of the 64-bit architecture
Also, you may need to take a look at this looooooong discussion:
http://ubuntuforums.org/showthread.php?t=24575
For kernel compiling, you will need to explicitly specify the architecture:
$ make ARCH=i386 menuconfig
$ make ARCH=i386 bzImage
Happy compiling :)
*** Returning to this issue with Makefiles
just run:
$make CFLAGS=-m32 LDFLAGS=-m32
this adds the -m32 option to both the compiler flags and the linker flags
$ gcc -o hello -m32 hello.c
the -m32 flag tells the compiler to target the 32-bit architecture instead of the 64-bit architecture
Also, you may need to take a look at this looooooong discussion:
http://ubuntuforums.org/showthread.php?t=24575
For kernel compiling, you will need to explicitly specify the architecture:
$ make ARCH=i386 menuconfig
$ make ARCH=i386 bzImage
Happy compiling :)
*** Returning to this issue with Makefiles
just run:
$make CFLAGS=-m32 LDFLAGS=-m32
this adds the -m32 option to both the compiler flags and the linker flags
Monday, April 7, 2008
iwl3945 Finally Working :)
This post saved me from throwing away the Linux 2.6.24 kernel :)
http://ubuntuforums.org/showthread.php?p=4612681
http://ubuntuforums.org/showthread.php?p=4612681
Saturday, April 5, 2008
PDF Multiple Page Per Sheet in Linux
To print multiple pages/sheet, you'll need the `pdfjam' package installed. Then,
$pdfnup --nup 1x2 input.pdf
$pdfnup --nup 1x2 input.pdf
Subscribe to:
Posts (Atom)