gcc – POFTUT

Tagged: gcc

0

How To Use Linux ldd Command To Print Shared Libraries with Examples?

Shared libraries are used to provide functions to the commands and executable of the Linux. ldd command can be used to list currently used shared libraries of given executable file. Help Even ldd command is a simple command which provide some parameters this can be listed with the –help option like below.

Print Given Executable Shared Libraries We will start with the basic usage where we will print given...

1

mmap Tutorial with Examples In C and C++ Programming Languages

As programmers we generally use malloc() , free() and similar functions in order to allocate memory. They are provided by glibc() library. The actual work is done by mmap() and munmap()which is a Linux systemcall. What Does mmap() Function? mmap() function or system call will create a mapping in the virtual meory of the current process.The address space consist of multiple pages and each page can be mapped some resource. We can create this mapping...

0

How To Use GCC Compiler Options Like Optimization, Flags?

gcc is very popular compiler in Linux world. gcc provides interpreter and compiler for programming languages like C, C++, Java etc. In this tutorial we will examine popular compiler options like error, pre-processor, output, optimization etc. Example C Application Code During this tutorial we will use following simple example code. As we can see this code only prints HELLO POFTUT.COM to the standard output.

Specify Output Executable File Name The default behavior...

0

How To Download, Compile and Install Custom Linux Kernel Manually In Ubuntu, Debian, Mint, Kali, CentOS?

Linux is a Operating System kernel and user space applications will create different distributions like CentOS, Ubuntu, Mint, Kali around this kernel. Kernel can be downloaded freely and used without any license fee. In this tutorial we will learn how to download Linux Kernel from kernel.org and compiling with GCC . An the last step installing or upgrading the kernel. Download Kernel Source Code Kernel source code is originally maintained...

0

Debug Applications with gdb In Linux

gdb is the short form of GNU Debugger. Debugger is a tool used to search and find and get detailed information about bugs in applications binaries. gdb is popular in Linux community which is used by most of the IDE, Programming tools event in Android IDE’s. In this tutorial we will look how to start and use basic features of gdb . Example Code During this tutorial we will use following simple application...

0

Cmake Tutorial To Build and Compile In Linux

Binaries are created by building or compiling source like C, C++ etc. In simple applications we can build by using the compiler like gcc directly. But this is inconvenient if the application is big and have a lot of source code, configuration file and build options. Developers generally prefers build systems like make but there is alternative named cmake which is popular in Linux ecosystem too. About CMake is an...

0

How To Install Tar.Gz or Tar.Bz2 Application Source Code?

As a systems administrator I generally use package managers to install software. But in some situations I can not use package manager because provided software version is old or do not compatible. In this situations how can I install new software from source code by compiling. Software source code can be get in different forms like compressed files like tar.bz2 , tar.gz or from repositories like git , svn etc. We will follow compressed...

Compile C Hello World Program 3

Compile C Hello World Program

C is a popular programming language for new programmers. There are some rituals while starting to learn some programming language which is called Hello World Example or Hello World or Hello Worl in C. In this tutorial, we will learn how to code the Hello World program in C, compile and run it from the command line. Example Hello World Program We will use the following Hello World source code...

0

How To Install and Use Cygwin With Terminal and Ssh Examples

Cygwin is free software to provide Linux and Unix environment, tools and libraries in Windows operating systems. Cygwin is also called an emulator because it translates Linux system calls into Windows type systems calls. Cygwin generally used to run Linux tools like ssh,scp,bash, X11,gcc in Windows environment. Cygwin support following operating systems Windows XP Windows Vista Windows 7 Windows 8 Windows 10 Windos Server 2003 Windows Server 2008 Windows Server...

0

Manage Libraries With ldconfig Command In Linux

Linux applications, tools, services uses libraries to get necessary functionalities. Libraries provides a lot of functionality to the related applications, tools and services. One library can be used by different applications. This is called dynamic library using or loading. Shared Libraries Shared libraries reside in /lib , /lib64 and /usr/lib . Each library is put into related directories like apt , gcc or similar. Dynamic libraries generally have extension .so but there are also some version...

Enjoy this blog? Please spread the word :)