C is a general-purpose programming language

learn more… | top users | synonyms

1
vote
1answer
21 views

Gnuplot - Save result

I create a graph that changes each second using gnuplot.Now, I want to save this graph as gif or png file when my program finishes. How can I do? My C code is below FILE *pipe = popen("gnuplot ...
0
votes
1answer
14 views

Connecting multiple serial ports

I am trying to communicate serially using bluetooth. I have tried to send a character serially to a program1.c program and it is reading it. I would like to use the same serial port /dev/rfcomm0 so ...
0
votes
0answers
9 views

Can i use “gksu” to became root for CLI operation?

I don't care if this is unsafe, because i'm only doing it as a programming exercise, but that's what i want to do: I want to create a C program that, with the "system" command, will call dpkg and ...
0
votes
0answers
14 views

How to read raw disk image in C? [closed]

I am doing a project wherein I need to read raw disk imge and write them to another one using C functions. Is there some way in C through which I can read such raw disk image?
5
votes
2answers
155 views

C Using Libraries Without IDE [on hold]

This may be a stupid question. How do you use C libraries without an IDE? I want to only use a text editor.
0
votes
2answers
7k views

how to compile a c program that uses pthread.h?

I'm a beginner and I'm new to Ubuntu. I just installed it and want to run a C program. I have no idea what platform to use or where to write the code. I need to use pthread.h header file in the ...
0
votes
0answers
22 views

mount ecryptfs with syscall in C language

I am trying to mount an fs with ecryptfs in a program in C. But I don't manage to give to the kernel part the key int mount_crypt(char* source) { int r = -1; char opt[1024] = ...
0
votes
1answer
20 views

Ubuntu: “X” mark on the top-right corner of respective file icons

I am new to ubuntu/ linux. Hence, please accept my apology for asking very trivial questions. Also, I googled; but, did not find suitable answer. I installed a third party lib: Taucs (location on my ...
0
votes
1answer
35 views

Installation failed for API

I'm developing an app for sending OSC messages working through the outlet port 4444 and I am using a C API call Liblo. Project page: http://liblo.sourceforge.net Normal install it by running the ...
4
votes
1answer
4k views

Where's my /usr/include/sys directory?

I recently upgraded from Kubuntu 12.04 to 13.04, a complete reinstall. Using gcc 4.7.3. I compiled some programs to discover there is no /usr/include/sys directory. That is, types.h, stat.h, etc, ...
20
votes
2answers
43k views

Installing curl.h library

Could you help me install curl.h library?
0
votes
1answer
21 views

Where are the headers with IOCTL numbers for ext4?

I am looking for ext4.h, or another file that contains EXT4_IOC_*. There is nothing in /usr/include or /usr/src. I have linux-headers-generic installed. I am on Kubuntu 14.10. Where are the headers? ...
0
votes
1answer
63 views

fatal error: linux/err.h: No such file or directory [duplicate]

What package should install for this header (err.h) is available? I need this library (linux/err.h) to compile a proprietary driver (kernel module) in Ubuntu 14.04 Server/Desktop 64bits
1
vote
1answer
194 views

Lightweight C/C++ editor with code completion and debugging

Ever since the debugger plugin for geany stopped working (see below), I am looking for an editor for C/C++ source files with the following features: Code completion (i.e., Intellisense-like ...
0
votes
0answers
50 views

How to get paths for default theme icons folders?

I have a desktop file, for Icon i set it to myIconName. Now I have multiple sized PNGs for my icon. I need to find the paths to the default theme icon folders, cross-OS-Linux solution, so I can drop ...
2
votes
1answer
54 views

GNU C - Signals never arrive to the handler

I'm working on a university project which needs to be written in GNU C and run on Ubuntu server. My primary OS at home is Ubuntu 14.04 on my PC. The project is about multi thread programming and I ...
8
votes
1answer
3k views

Why Ubuntu uses eglibc instead of glibc?

I checked for the libc version on my Ubuntu 64bit 12.10 machine by issuing the command ldd --version. I saw that Ubuntu uses eglibc instead of glibc. As egiblc is for embedded machines, Is there a ...
0
votes
1answer
501 views

how to compile a C code to call an octave function and make the GUI using GTK+2

i am trying to call a octave function from C code but the problem is that when why run this command in octave mkoctfile --mex addition_GUI.c error occurs addition_GUI.c:1:20: fatal error: gtk/gtk.h: ...
1
vote
1answer
13k views

Can Ubuntu provide an IDE for C, C++ programming? [duplicate]

I am a beginner in the field of programming. I have tried to learn C and C++ on a Windows 7 computer using the Turbo C++ compiler, but faced frequent failures and finally my laptop's motherboard ...
1
vote
2answers
172 views

Unendable question C or C++ [closed]

Got a question related to programming. I was planning to choose one more language, besides Java, and stuck between choosing C or C++. I am planning to create apps specifically for Ubuntu with GUI ...
0
votes
0answers
25 views

Fullscreen Detection Algorithm for lockscreen/screensaver

I'm working on a cross linux fullscreen detection algorithm, for use in detecting lock screen and screensaver. This is what I have so far: Check if _NET_WM_STATE_FULLSCREEN is supported, if it is ...
10
votes
1answer
13k views

No acceptable C compiler found in $PATH

I want to install one package named speech_tools-2.1-release.tar.gz. After I run command ./configure in this package, it show me a message: Configure: error: no acceptable C compiler found in $PATH ...
4
votes
2answers
3k views

Installing a comprehensive LAPACK implementation under Ubuntu

I would like to ask how to properly install a comprehensive LAPACK package as e.g. is offered by the Gentoo package 'sci-libs/clapack' within a Ubuntu environment. I am not talking about atlas here, ...
0
votes
1answer
94 views

Using mysql in C programming [closed]

I installed ubuntu on a virtual machine.There,I installed mysql server(sudo apt-get install mysql-server) .This worked, because I could acces mysql-u root -p password. After that,I did : sudo apt-get ...
0
votes
0answers
47 views

Creating SHA-512 password with function crypt

I want to create an encrypted password in a C program with the function crypt with the SHA-2 based hashing algorithms that are supposed to be included in the GNU C Library used by almost all Linux ...
0
votes
0answers
15 views

How to Terminate the Child process using ISR from parent process?

I wanted to create a C program to terminate a child process after specific time period (alarm()) using user defined ISR(Interrupt Service Routine) of parent process. How to do it?
1
vote
1answer
55 views

How do I open C libraries and functions implementations?

I am having a problem that I cannot browse the header files /libraries to get the implementation of the C functions like mssget, msgsnd, shmat etc. How should I open these files?
8
votes
2answers
2k views

Installing Valgrind on a 3.x Kernel

I was reading Learn C the Hard Way when I stumbled upon and followed the instructions for installing Valgrind, the C debugger. However, when I ran ./configure to setup build configurations, I got ...
0
votes
0answers
15 views

After my Disc partition, when i try to open my C: disc i get this message. Help please! [duplicate]

Error mounting /dev/sda4 at /media/santiago/7E460D8D460D46FD: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" ...
0
votes
0answers
77 views

Header file for struct proc_dir_entry

I'm writing a firewall for the Linux kernel and I'm using the proc_dir_entry data structure (which I've found in the tutorial I'm currently reading). My firewall is conceived as a kernel module but ...
0
votes
1answer
26 views

Not able to include sqlite3 in c program

I installed libsqlite3-dev from ubuntu software center and after the installation, i found the sqlite3.h file in usr/include folder. There was no error in including that header file, but i am not able ...
0
votes
1answer
72 views

Sending different kill signals to init - how to log

I have to write a C program to check how init reacts to different kill signals, however I am not sure how to log it - for example signal number 14 crashes the ubuntu, then some higher one turns it ...
-3
votes
1answer
120 views

C programming questions (newbie) [closed]

I read Kernighan & Ritchie C programming book now and have a few questions about 'getchar' and 'putchar'. The question is below the code example: #include <stdio.h> int main(void) { ...
0
votes
1answer
35 views

Which compiler i have to use to understand C behaviour exact behaviour

I am confused regarding with the c compilers. as per my knowledge for a programmer the code is not important but the internal behaviour is very important.cause if we know how the compiler behaves for ...
0
votes
0answers
129 views

Unable to create a directory on a mounted file system (FUSE). mkdir: cannot create directory `dirname': File exists

I was trying out the FUSE file system. I downloaded fuse 2.9.3 and installed it to a directory in my Home directory. I did rest of the work as superuser (as I was denied to manipulate the mounted ...
0
votes
3answers
3k views

how to play audio file using c++ in linux

I am coding this c++ program .I want to play audio clip, format dosen't matter , its just I wrote hello word the most basic program of any language but the thing is instead of showing hello world on ...
0
votes
2answers
925 views

No such file or directory #include <string> [closed]

I wrote the program kai.c and now am trying to compile it with gcc kai.c -o kai, which returns: kai.c:5:18: fatal error: string: No such file or directory #include <string> ^ ...
1
vote
1answer
3k views

How to implement the MSG_DONTWAIT on a recv call

I am implementing a server simulation program and want to check if anything was received via a recv from a TCP/IP socket witout waiting. When I place the MSG_DONTWAIT flag, recv returns a length of -1 ...
0
votes
1answer
95 views

FT_Read is not working properly [closed]

I am writing code for serial programming for serial communication between FTDI device and Desktop through XBEE. I am writing command on device for (in example) reading Battery Voltage Current and ...
-1
votes
1answer
126 views

json_object_iterator.h not Found

I am trying to parse JSON object from C program. but i got following error. my c program contains json/json.h header file. this header file is causing below error. May I need to install anything. I ...
0
votes
2answers
453 views

Installing C POSIX libraies in ubuntu 14.04 LTS

I'm trying to install the following C POSIX libraries in ubuntu 14.04 but for some reason some of them won't intall. The libraries; sys/ioctl.h unistd.h locale.h ncursesw/ncurses.h Comands sudo ...
1
vote
0answers
27 views

Permission denied when running C programs outside the Home directory [duplicate]

I have been creating some C programs and I have saved them to my Home directory while editing. I have compiled them with gcc and then run the executable file with ./ and they work fine. However, when ...
0
votes
1answer
57 views

How to compile with X11 library?

I'm trying to compile this code here: http://lists.kde.org/?l=kwin&m=115435217715650&w=2 I compile it with this line of code: gcc -lX11 -lstdc++ -L/usr/X11/lib -o icon icon.c but it keeps ...
0
votes
1answer
73 views

How to use the c/c++ code to change ubuntu's background

Or any other way.I want to make an application to make my desktop pretty.
0
votes
0answers
387 views

How to install C++ libraries in Ubuntu 14.04

I've been searching for a couple of hours but I haven't found anything yet. I want to know which is the preferred method for installing C/C++ libraries in Ubuntu 14.04. Is there a CLI command or ...
1
vote
1answer
28 views

Stat a PID for claim time?

Is it possible to stat a process ID to get the time it was claimed?
0
votes
0answers
28 views

No SDLIMAGE found while running ./configure file

recently i installed libsdl1.2-dev to install a game, after installing it in system. I run ./configure file and I am getting new error checking for sdl-config... /usr/bin/sdl-config checking for SDL ...
0
votes
1answer
26 views

get pdiffer working in ubuntu

I am trying to use pdiffer in ubuntu. It is a python interface to the PerceptualDiff tool. https://pypi.python.org/pypi/pdiffer I installed pdiffer using pip (after installing pip) I installed cmake ...
1
vote
1answer
1k views

Why can't I use conio.h or ncurses.h?

I am new user to Ubuntu. I wrote a simple program in C. When I try to compile it to use conio.h, the compiler gives me fatal error. So I tried by ncurses.h, but still I am getting same error.
0
votes
2answers
35 views

wallpapers for ubuntu, paint app [closed]

I want to have new wallpapers for ubuntu desktop. How to get them, where? Also what is paintbrush app named in ubuntu. In windows it is mspaint. Is C compiler available from software centre?