C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
0answers
21 views

How to ping an address port?

I'm working with this code that drop packets in a specific port : #include <linux/module.h> #include <linux/string.h> #include <linux/kernel.h> #include <linux/ip.h> /* ...
0
votes
0answers
12 views

Setting up a window manager development environment and a basic guide

I am using Ubuntu and I am not able to understand from where can I get the Xcb libraries. While I was checking some guide (whose name I forgot) I got the command : cc file_name.c -lxcb It was written ...
0
votes
0answers
12 views

memory leak with Ubuntu 16

Valgrind reports a memory leak but only during my scripted test. The code runs and works (doesn't crash and gives correct output) but Valgrind reports a memory leak during my automated test. Valgrind ...
3
votes
0answers
34 views

How can I run an c/c++ program that use GNU Scientific Library (GSL)?

I'm trying to run 2 simple examples in c/c++ using the GNU Scientific Library. That are the codes: 1st: An Example Program #include <stdio.h> #include <gsl/gsl_sf_bessel.h> int main ...
-1
votes
0answers
23 views

Why is tab completion with editline not working? [on hold]

If I look at the manpages for editline, it says that file completion should work but it doesn't. There is no information how to make it work. I have written a new shell that I want to use editline for ...
-1
votes
1answer
23 views

Permission denied in Codeblocks

I am unable to run codes in codeblocks it says : Permission denied. I am using ubuntu 14.0.4 (LTS)
0
votes
1answer
26 views

I want to compile C file

I want to compile c file. I use g++ <filename> -o <output-filename> Error: ch34x.c:13:24: fatal error: linux/init.h: Directory or file doesnt exist. (here is hash I cant type here)include ...
0
votes
0answers
20 views

14.04 X11/xlib Bad Access

I asked this question on StackOverflow (link) but then thought this might be the better forum to get my question addressed. Basically, I wrote some code to listen for certain keypresses (like 'c') ...
-4
votes
1answer
39 views

A c program works well in Ubuntu but when I compile and run it in windows using MinGW, the program runs but in result it shows some garbage value [closed]

I a wrote a C code in Ubuntu 14.04.4 LTS and compiled it. It is working as expected.But in windows it is running but at last in result it is showing some garbage values. The code I wrote is #include ...
0
votes
1answer
29 views

C compile error [closed]

when I try to compile my code I get this error : error: expected declaration or statement at end of input } and error: function declaration isn’t a prototype [-Werror=strict-prototypes] void ...
-1
votes
0answers
14 views

SDL2 won't work, No available video

I am currently running Ubuntu 15.10 and i have SDL 2.0.4 installed. When i run my code i get the following error message: SDL could not initiate! SDL_Error: No available video device My code: ...
5
votes
2answers
332 views

lint: command not found

Does Ubuntu have a lint utility? How is it installed? In computer programming, lint is a Unix utility.. https://en.wikipedia.org/wiki/Lint_%28software%29 thufir@mordor:~$ thufir@mordor:~$ gcc ...
0
votes
2answers
38 views

What is the meaning of this error: “Problem accessing file status”? [closed]

I am compiling in terminal a c code and when I am trying to run it I got this error. Is there any specific meaning? and how I can fix it?
2
votes
0answers
24 views

Questions regarding AppIndicator

I am trying to build a JNI wrapper for using Ubuntu's AppIndicator in a Java application. I have some experience in C/C++, though no experience in GTK and Ubuntu development. I have already done ...
0
votes
1answer
86 views

Clion “Bundled Cmake does not work in this enviroment” ubuntu 14.04

I used Eclipse CDT for college lectures, but today I find the solution for C/C++ by JetBrains. But I can't compile because I don't know how set the compiler. enter image description here Sorry for ...
-1
votes
1answer
28 views

How to get the current battery statistics using a kernel module? [closed]

I am using Ubuntu 14.04LTS. Can anyone give me some pointers on how to get the current battery level and the charging status of the laptop using a kernel module. If possible please attach the Makefile ...
0
votes
0answers
69 views

Problem with Cross-Compiling (C compiler doesn't work) [SOLVED]

I'm trying to compile the latest version of tcpdump (for monitoring network traffic) by using Cross-Compiling to create an Android binary. I'm following this steps: ...
-2
votes
1answer
66 views

running shell script using c program [closed]

I wrote a script to hide user input during runtime it works as a simple script but i want to integrate into c program but gives following errors: warning: missing whitespace after macro name error: ...
3
votes
2answers
241 views

How to debug c programs by gedit?

Is it possible to debug our programs written in c by gedit text editor ? If not, how can i do it ?
0
votes
0answers
35 views

libiptc error on unbunt14.04

Am trying to work with iptables, using libiptc to manipulate the entries. Header looks something like this. I have iptables-dev installed on my machine. Am getting following error, but the same ...
-1
votes
1answer
128 views

How to install C compiler in version 15.10?

I've searched many methods, but couldn't find best C compiler. Earlier, I used Win7. In that, I've used Turbo C/C++ v4 compiler. It will open in DOSBox. So, I've installed DOSBox in Ubuntu 15.10. I've ...
5
votes
3answers
1k views

What is EOF and how to trigger it? [closed]

This is my C source code. When I build it in Ubuntu, it starts to get characters but I don't know how to end the program, as it does not end by inputting ENTER or a carriage return. What does EOF ...
0
votes
0answers
46 views

Why do I get this message? I am just install build-essential?

xxx@xxx:~$ sudo apt-get install build-essential [sudo] password for xxx: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages ...
0
votes
0answers
16 views

data is missing while writing into a file in Ubuntu

I am using UBUNTU 14.04 LTS. I am coding GUI program with QT creator,for MIL-STD-1553 communication.I am saving the Data what ever sending the data to RT(Remote terminal)from BC(bus controller) in a ...
0
votes
2answers
71 views

I need root to run ./a.out (C) program [duplicate]

cd /media/k4li/data2/C gcc program.c ./a.out running ./a.out: bash: ./a.out: Permission denied if I enter sudo ./a.out i get: sudo: ./a.out: command not found
0
votes
0answers
31 views

How to create App Indicators using glade and c

I have to create an app indicator for my project. After several research I found that libappindicator is an option. But it seems depriciated. Also I am doing my project in gtk-3. Is there any way to ...
0
votes
1answer
58 views

Makefile giving error

I recently started learning C language on Ubuntu 15.10 .Today I learned about Makefile from http://c.learncodethehardway.org/book/ex2.html .But the problem is I keep on getting error ...
0
votes
1answer
61 views

Unable to compile in geany

Whenever I try to compile any file whether c , c++ or python in geany I get this error.
0
votes
2answers
38 views

safe files in c on ubuntu 15.10 [duplicate]

I would like to write a Software and this Software have to save files in /usr/share/xy/. The Software would write and read this data with fprintf() and fscanf(). The owner of the directory /xy/ is ...
0
votes
1answer
44 views

C complier is not working

Well I am trying to build the dependencies between some scripts for the android-python27 project in order to integrate charm library in a apk.While I am running a script named pbc.sh I get the ...
0
votes
1answer
23 views

The file descriptor is duplicated in the thread [closed]

My C source behaves strangely. I use Ubuntu 14.04 I use two pthread. And in each of pthread calls the open () and socket (). Oddly, this file descriptor is duplicated in certain cases. Why do ...
2
votes
2answers
741 views

Can't access cairo.h

I've installed cairo-1.4.14 using make install, but after trying to compile my code: fatal error: cairo.h: No such file or directory #include <cairo.h> ^ I compile using ...
0
votes
0answers
12 views

Can't install library in Ubuntu 14.04 [duplicate]

I tried to install cairo-1.14.4 library. After make install: /usr/bin/install: cannot create regular file '/usr/local/lib/libcairo.so.2.11400.4': Permission denied
0
votes
3answers
113 views

How do I compile a c program made in sublime text? [closed]

I am new to programming and I used sublime text but the gcc command dos not work and I need help to compile the code
0
votes
0answers
83 views

How to cross compile ARM lib for use in xCode on Mac OS X?

How to cross compile a static lib in C for armv7 architecture to be used in iOS app projects developed and linked in xCode on Mac OS X machine?
1
vote
1answer
131 views

libhid.so.0: cannot open shared object file: No such file or directory

I am trying to install an old program from here I can't seem to get it working it kicks back "shark: error while loading shared libraries: libhid.so.0: cannot open shared object file: No such file or ...
-1
votes
1answer
35 views

Trashcan fatal error: no input files

I have to build a trashcan in shell. The trashcan has the following funktions: get(-g), put(-p) and remove from trashcan (-r). So i tried to compile this (gcc -o trashcan.sh) but i got a fatal error: ...
0
votes
0answers
8 views

Recompile MySQL server with debugging enabled

So I am facing this problem, where I am trying to add the .so file to mysql plugin directory and try to create a function from that file and I just keep getting an error and one of the suggestion to ...
1
vote
0answers
127 views

Can't open shared library

I am trying to add a function i wrote in C into MySql, in the function I am using 'gmp' library, it compiles correctly and I copy the '.so' file to '/usr/lib/mysql/plugin/' and then log in to mysql ...
0
votes
0answers
93 views

integrate NVIDIA GeForce 9400 GT on ubuntu 15.10 and Nsight EE to start develop CUDA C/C++ software

I try to integrate NVIDIA GeForce 9400 GT on ubuntu 15.10 and Nsight EE to start develop CUDA C/C++ software. there is a problem to use debugger of NSight EE when a display is connected to NVIDIA ...
1
vote
3answers
286 views

How do I run my C program?

I am a newbie in c programming language , i am following a course right now , but I have a small problem which is run the file for testing I have opened gedit and I wrote those code lines int ...
1
vote
3answers
400 views

How to install a stand-alone program

If I create the following program in C: #include <stdio.h> int main(){ printf("Hello World"); } And then compile it like so: gcc helloworld.c -o helloworld Is there any easy way to ...
26
votes
2answers
696 views

How to develop a System Indicator for Unity?

This is not a duplicate of How to create Unity indicators?. I'm looking for system indicator not application indicator. Backgound: From these two questions: How do I add or manipulate ...
0
votes
0answers
42 views

Switch between terminals

I want to write an application in C Named AppController. as you can guess this application should control some other applications. Here I have a problem. I want to run three application with this ...
0
votes
1answer
31 views

A problem which I encountered in Eclipse [closed]

I have written a simple code in Eclipse/C Project as below: #include <stdio.h> typedef struct list { int data; struct list *next; }; list Listptr; int findTheSmallest() { } int ...
0
votes
1answer
1k views

checking whether the C compiler works… no

I am trying to run ./configure checking for pkg-config... /usr/bin/pkg-config checking for roff2html... no checking for distro... redhat checking pkg-config is at least version 0.9.0... yes checking ...
0
votes
2answers
195 views

Why CLOCK_TAI and CLOCK_REALTIME returns the same value?

On my Ubuntu 15.04 (Linux Kernel 3.19.0-28-generic) I get the same value when requesting CLOCK_TAI and CLOCK_REALTIME with clock_gettime(). This is apparently an error because the difference between ...
1
vote
0answers
138 views

How do i save a c program using geany? Error: The file on disk may now be truncated

Everytime I try to save a file in my usb Ubuntu using Geany, it gives me the following error message : Error opening file '/home/ricky/INT/1406641703/Lab02/Hallo.c': Permission denied The file ...
-1
votes
1answer
47 views

How to build native RXTX library for Ubuntu12.04/14.04?

Can someone give me a tip on how to build the native rxtx library on Ubuntu 12.04/14.04? We need to run on 12.04 but i develop on 14.04. I grabbed the source files from here: ...
0
votes
2answers
150 views

Problems with su: Authentication Failure

I am currently using Ubuntu and am 100% new to Unix. I have installed Ubuntu to program in C and will be using the "Learn C the Hard Way" online textbook ...