≡ Menu

GNU C / C++

HowTo: Compile And Run a C/C++ Code In Linux

I am a new Linux user and student who used to write C or C++ programs on MS-Windows. Now, I am using Ubuntu Linux. How can I compile a C or C++ program on Linux operating systems using bash Terminal application?
[click to continue…]

Linux: Set OR Change The Library Path

I've compile and installed a library at /usr/local/lib/libapp2.so -> libapp2.so.1.4.3. How do I set the Library path under Linux operating systems?
[click to continue…]

How do I find out the size of the bss, text segment and data segment for each object or binary file under Linux operating systems?
[click to continue…]

gedit: Add Python / C++ Autocomplete Support

How do I add Autocomplete support to gedit text editor under Linux Gnome desktop operating systems?
[click to continue…]

Freebsd makeinfo: not found Error and Solution

Q. I'm trying to build PHP5 under FreeBSD jail and I'm getting an error that read as follows:

m4.info-[0-9][0-9] ./m4.i[0-9] ./m4.i[0-9][0-9]; do if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; done; else :; fi && cd "$am__cwd"; if makeinfo --no-split -I . -o ./m4.info ./m4.texinfo; then rc=0; cd .; else rc=$?; cd . && $restore $backupdir/* `echo "././m4.info" | sed 's|[^/]*$||'`; fi; rm -rf $backupdir; exit $rc
makeinfo: not found
*** Error code 127

Stop in /usr/ports/devel/m4.
*** Error code 1

Stop in /usr/ports/devel/autoconf262.
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

How do I get rid of this problem and compile applications?
[click to continue…]

Alarm clock: How To Set Timeout For A Shell Command

Q. How can I run a command called foo, and have it timeout / abort after 10 seconds under GNU/Linux running bash shell or script? How do I run command under an alarm clock?
[click to continue…]

Q. Solaris and FreeBSD both provide the truss command to monitor and debug system calls. I'm unable to find this command or package. How can I install truss under Linux?

A. truss is a debugging utility in Solaris and FreeBSD to monitor the system calls used. It is used to trace call and useful debugging many problems. Linux provides strace command. This command is installed by default. strace is a useful diagnostic, instructional, and debugging tool. System administrators, diagnosticians and troubleshooters will find it invaluable for solving problems with programs for which the source is not readily available since they do not need to be recompiled in order to trace them.
[click to continue…]