Debarshi's den - দেবর্ষির ডেড়া

Debarshi's posts with tag: gcc

What are tags? You can give your posts a "tag", which is like a keyword. Tags help you find content which has something in common. You can assign as many tags as you wish to each post.
View posts by people in your network with tag gcc
Blog EntryGCC/GDB/MakeJun 29, '07 5:16 AM
for everyone
The GCC/GDB/Make workshop at Rajabazar Science College organized by Calcutta University and Indian GNU/Linux User Group Calcutta has come to an end.

You can find the slides and examples used in the workshop here. They were made by Santanu Sinha, and released under Creative Commons Attribution-ShareAlike license.

Blog EntryRead-a-lineMar 3, '07 1:17 AM
for everyone

Today at around 02:15 hours I learnt to use GNU Readline in C programs. No particular reason for me to do so, except that the recent changes in build infrastructure of GNU Parted initiated by Jim Meyering had suddenly caused the 'configure' script from detecting my system's Readline libraries. After my sleep-deprived eyes had failed to detect any particular bug in configure.ac, I landed up at the GNU Readline manual.

I must say I have not yet solved the Parted problem, but managed to scrible an elementary program with ample help from the manual. Find it here.

Dependencies:a. readlineb. readline-develc. termcapd. libtermcape. libtermcap-devel

Compilation instructions:$ gcc readline1.c -lreadline -ltermcap


Blog EntryDeprecating a C function.Dec 22, '06 5:35 PM
for everyone
Here is a nice way to mark a particular C function as deprecated. It might come in handy if you are in the process of developing an API or library and intend to phase out a particular component of it. The Linux kernel developers also use this method.

Here is what you get on compiling and running it:
[rishi@Sunflower devel]$ gcc -ansi -pedantic foo.c -o foo
foo.c: In function ‘main’:
foo.c:8: warning: ‘foo’ is deprecated (declared at foo.c:5)
[rishi@Sunflower devel]$ ./foo
I am foo.
[rishi@Sunflower devel]$


© 2008 Multiply, Inc.    About · Blog · Terms · Privacy · Corp Info · Contact Us · Help