C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
0answers
15 views

compilation terminated: Package linphone was not found in the pkg-config search path [duplicate]

In trying to compile helloworld.c for linphone, I get: thufir@mordor:~/sip$ thufir@mordor:~/sip$ gcc -o helleworld helloworld.c $(pkg-config --libs --cflags linphone) Package linphone was not found ...
1
vote
2answers
3k views

How to overcome “Permission denied” running C program even after “chmod +x”?

After compiling a C program on Ubuntu 10.10, after executing chmod +x ./a.out, I am still getting bash: ./a.out: Permission denied. How can I run my new executable?
-6
votes
0answers
43 views

question about C code [closed]

I want to know why this program print -16 instead of 244 ? In other word how integers stored in variable of type Char ? 1.code #include <stdio.h> int main() { signed char x=244; char ...
-1
votes
0answers
18 views

I am trying to create a library in C [closed]

I have the following code for calculating exp(x). This is an inbuilt function in math.h library. Following code is in a file exponent.c. This code is compiled into a static library called libctest.a ...
0
votes
1answer
43 views

C Source to .Snap [closed]

Source is in C. Requires multiple dependencies to successfully make. This will not appear in the app-store. There is no GUI component. This application is designed to run on a specifically-...
1
vote
2answers
3k views

Installing C POSIX libraies in Ubuntu 14.04 LTS [duplicate]

I'm trying to install the following C POSIX headers in Ubuntu 14.04 but for some reason some of them won't install. sys/ioctl.h unistd.h locale.h ncursesw/ncurses.h Commands tried sudo apt-get ...
2
votes
5answers
423 views

how to code in ubuntu? [closed]

I used turbo c++ in windows to write c/c++ codes. Recently I started using Ubuntu, now where should i write c/c++ code in Ubuntu like we used to do in windows? Which software should I download from ...
0
votes
0answers
18 views

Problem running script from rc.local

I have a C script running to do some stuff when i push a button on my raspberry pi. When i run this script from a shell window, everthing works fine. However when i run the exact same script from rc....
0
votes
0answers
35 views

What's the most convenient GUI framework in Ubuntu 14.04 to create a graphical interface for a Kinect 2.0?

I want to create a graphical interface for the Kinect 2.0 (for Xbox One) in Ubuntu 14.04 LTS combining Python and C programming languages, in order for anybody to be able to easily use it, i.e., ...
0
votes
1answer
17 views

“bash: ./cents: no such file exist or directory” while trying to run a program that has already been compiled

Can someone explain to me why this happens? It compiles the program fine but it wont let me run it. I'm on ubuntu 16.04 Bonus question: How can I run the math library on Geany? I love the interface ...
29
votes
2answers
824 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 Application/...
51
votes
4answers
66k views

fatal error: sys/cdefs.h: No such file or directory|

It has been weeks that I am trying to use Code::Blocks IDE on Ubuntu 14.04 LTS to program Atmega16, however I am hindered by the following error while compiling/building the program in C::B /usr/...
0
votes
1answer
214 views

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

I used Eclipse CDT for college lectures, but today I found the solution for C/C++ by JetBrains. But I can't compile because I don't know how to set the compiler.
0
votes
0answers
39 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
21 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 ...
3
votes
0answers
71 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 (...
0
votes
1answer
37 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 ...
1
vote
0answers
111 views

'__FDELT' and '__FDMASK' not declared in this scope (posix_types.h not included)

I'm running Ubuntu 12.04 LTS, 64bit version. I'm getting the following error when compiling a C++ program: ../elements/userlevel/socket.cc:477: error: '__FDELT' was not declared in this scope ../...
0
votes
2answers
214 views

gdb - load kernel module for remote debugging

Ubuntu 14.04 LTS: peter@peterubuntu0:$ insmod mymodule peter@peterubuntu0:/sys/module/mymodule/sections$ cat .text .data .bss 0x0000000000000000 0x0000000000000000 0x0000000000000000 So how do I ...
0
votes
0answers
34 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
54 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
33 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 ...
2
votes
1answer
2k views

gtk-builder-convert Error

I am doing the tutorial in the link http://www.micahcarrick.com/gtk-glade-tutorial-part-1.html When I run the gtk-builder-convert tutorial.glade tutorial.xml I get the following error Traceback (...
5
votes
2answers
431 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 ...
3
votes
2answers
281 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
2answers
43 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
34 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 some ...
1
vote
1answer
148 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
33 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 ...
1
vote
2answers
48k views

How to compile a C program that uses math.h? [closed]

I am having problems in math.h header file and when I use square root function as in sqrt(d). But my compiler is not supporting this. Please advise me about this problem. My Ubuntu version is 2012.
2
votes
4answers
35k 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
111 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: http://www.androidtcpdump.com/...
-2
votes
1answer
83 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: ...
6
votes
2answers
10k 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, ...
1
vote
1answer
2k views

How to run C program on 14.04?

I'm trying to run some C programs using Geany and Code::Blocks. After coding them, when I run them, a message is showed in the terminal like this: In Code::Blocks: sh: 1: /home/c program files/2: ...
0
votes
0answers
64 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 ...
5
votes
3answers
2k 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 ...
-1
votes
1answer
168 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 ...
0
votes
0answers
65 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
2answers
398 views

Can't Compile A Simple C Program

I installed the last version of Ubuntu. I tried to compile and run simple c program. I was get error: fatal error: stdio: No such file or directory I installed and updated gcc compiler few times, ...
0
votes
0answers
17 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 ...
30
votes
2answers
75k views

Installing curl.h library

Could you help me install curl.h library?
3
votes
4answers
3k views

How to install Xaw package with header files?

I'm having this error on Ubuntu 14.04: checking for X... libraries , headers /usr/include/X11/ configure: error: Cannot find required Xaw header file Box.h; PDCurses cannot be configured How can I ...
0
votes
2answers
96 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
39 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
106 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 bharat@...
0
votes
1answer
71 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
39 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 ...
5
votes
5answers
7k views

Check if IP is static or dynamic programmatically

I'm trying to determine whether my IP has been statically or dynamically assigned in Ubuntu 11.04 from within C. The closest I've come is examining /var/lib/dhcp/dhclient.leases, but that doesn't ...