C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
0answers
14 views

Using Address Sanitizer in ubuntu 12.04

I have read that Address Sanitizer is an available alternative to the valgrind. So to get into it, i have started with a simple example. I have written the below given code into use_after_free.c ...
0
votes
0answers
19 views

Problem running graphics.h in Ubuntu 14.04 in CodeBlocks [on hold]

I've been trying to compile the following C code in CodeBlocks with the -lgraph extension (which I have set in the Linker Settings), the graphics.h library of Turbo C++ and libgraph-1.0.2 being ...
-1
votes
1answer
16 views

Unable to use ncurses eader in ubuntu lts 14.04 [on hold]

hello guys please help me with this problem.... i just started using ubuntu and there are some problems while i'm using c language like i can't use conio, graphics etc. Please also suggest tips to ...
3
votes
2answers
147 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
28 views

How should I start to learn c++? [closed]

I have a good knowledge of programming in C and I want to learn c++. Should i start again from data types and variables ? Where from should I start with c++ if I know C?
0
votes
0answers
10 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 ...
6
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 ...
38
votes
3answers
49k views

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

It has been weeks that i am trying to use Code::Blocks IDE to program Atmega16, however, i am hindered by the following error while compiling/building the program in C::B ...
-1
votes
1answer
37 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
24 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 ...
1
vote
0answers
17 views

Export functions of a library? [closed]

So, I want to make a clone of a library(libc for the matter, but I would like to apply this elsewhere), and I'd like to know method signatures for LD_PRELOADing, or if I make a complete wrapper for ...
0
votes
2answers
354 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
14 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 ...
29
votes
2answers
65k views

Installing curl.h library

Could you help me install curl.h library?
3
votes
4answers
2k 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
33 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
14
votes
0answers
322 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
18 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
27 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
38 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
28 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
6k 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 ...
0
votes
1answer
32 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
3answers
65 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
1answer
14 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
298 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
1
vote
3answers
6k views

How do I get the pcap lib on Ubuntu?

I have a programming assignment where I need to use the pcap lib. #define _BSD_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pcap.h> // <-- ...
1
vote
2answers
2k 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 ...
2
votes
0answers
1k views

gcc couldn't locate slab.h in ubuntu 12.04?

Please correct me if I'm missing something here. Thanks for your inputs. Header included in code: #include <linux/slab.h> Code snippet from my file that's asking for memory allocation using ...
5
votes
2answers
10k 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, ...
2
votes
1answer
514 views

Install kernel 2.6.x headers on a 3.11 machine and build driver using 2.6

I have a proprietary SDK for an embedded device which was built with Linux kernel 2.6.32 and is dependent upon its headers. With newer kernel (3.11.x), it fails to build complaining about missing ...
1
vote
1answer
92 views

how to implement the functions which are defined inside the conio.h

I wanted to use the conio.h header file in one of my C codes but as we know the header file is not available for Ubuntu, what should we do if we want to implement the functions if the header file ...
2
votes
1answer
962 views

Where are header files for gcc located?

I want to manually add some header files like math.h and graphic.h for gcc but don't know where to put them.
1
vote
1answer
121 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? ...
3
votes
1answer
619 views

Location of USB header files for Include

I'm working on porting a Windows application to Ubuntu 14.04. The application is a host-side GUI for a USB device that uses the generic HID interface. I need to Include the header files for the ...
3
votes
2answers
2k views

symlink for dbus headers

Source code for something that won't compile has the line #include <dbus/dbus.h> but in real life that header file is in /usr/include/dbus-1.0/ Similar situation exists for the dbus-c++ ...
4
votes
1answer
5k 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.
2
votes
1answer
6k views

Modification of stack size by ulimit -s

When I type ulimit -s in terminal it shows 8192. Does it mean that in my C code I could only have local variable of 8192 bytes? I am confused which stack size. Does ulimit -s change when we modify ...
0
votes
0answers
30 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
0answers
84 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
26 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
6 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
62 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
73 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
235 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
377 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 ...
0
votes
2answers
112 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
1answer
2k views

Compiling a C file through Gedit external tools

Is there any way to compile and run .c files by using a shortcut key using gedit? I know its possible for java and C++, and I read somewhere that it is possible to do so using scripts in external ...
2
votes
2answers
657 views

How can I compile a C program file which I created using the Libre Office editor?

I'm new to Linux and I need some help! I am trying to compile the code taken from this post to the linux-kernel mailing list. I have pasted the file into Libre Office and saved it as pairing_tool.c ...