C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
2answers
372 views

GUI and C coding gtk files?

I am trying to write a program in C and I need the gtk/gtk.h file, which I both currently don't appear to have nor am I sure how to get it. When I compile all I get is cannot find the file, how can ...
3
votes
1answer
89 views

wait() weird behavior in Ubuntu

I wrote the following program and executed in terminal. But I am confused that the program isn't displaying the results as wait behavior is described on internet. I copied this code from a book. ...
3
votes
3answers
3k views

What is the use of /usr/include directory?

I'm very new to Ubuntu. I'm looking at the directory /usr/include it contains lot of header files. I know they have specified certain constants and other information that are used in Ubuntu. I'm ...
4
votes
1answer
463 views

Configurating man page to work like “man xxx”

I made a application in C. I wrote a manpage for this program and it's called something like edit.1. I "compiled" groff -man -Tascii edit.1 | less Now I can start it like man ./edit.1 from the ...
4
votes
1answer
254 views

What are these files in my /dev directory?

I know that most devices are presented in the /dev directory, but only now have I actually noticed two very strange, yet familiar names in there... I'm talking about stdin@ and stdout@ down there: ...
2
votes
4answers
1k views

.exe file created by C programming through gcc compiler isn't executing

I am using Ubuntu 12.04 on my desktop and Ubuntu 11.04 on laptop. I am writing c program which contains math. I am creating executable file through the command: gcc -o filename.exe filename.c -lm ...
0
votes
1answer
621 views

Unable to use “graphics.h” header file in 12.04

I am new to Ubuntu and I need to write some graphics programs in C which uses the header file graphics.h , but I am not being able to run any of my code without that header file, which is not present ...
0
votes
4answers
1k views

How do I enable a Buffer Overflow?

I just installed 12.04 (WUBI actually) and I wanted to learn a bit about buffer overflow. Unfortunately when I try to use a function like puts() and gets() in an incorrect manner (that is, to cause a ...
0
votes
1answer
205 views

How can I make this evhz.c file to run properly?

I'm really new at linux. I just installed Ubuntu 12.04- I compiled and tried to run a program but it doesn't work and I don't have a clue why. searched on google but no one seems to have a problem ...
0
votes
2answers
950 views

C program runs well in Windows but when run on Ubuntu it is not asking for string?

My simple code for getting info from user & print the same works fine with Windows OS (on Dev C++) but But its not asking for string when run on Ubuntu (tried Terminal/Dev C++ via WINE/Code ...
4
votes
1answer
128 views

Implementation of a slider on appindicator

I'm trying to add a slider to an indicator to port my gnome-shell extension to unity. I found out this question which is exactly my problem. If this is not possible using libido and indicator how is ...
2
votes
1answer
93 views

Can i reasonably link in C code to an application managed with quickly?

I'm looking around for a way to program some gui apps in ubuntu 12.04. I ran across the quickly tutorial and the tool looks fantastic. It looks like the primary language you develop with is python, ...
-1
votes
2answers
5k views

What is the Best Way for Using & practicing C language in Ubuntu 12.04? [closed]

I want to learn C language . and i would like to know how i can practice on C language by using Ubuntu 12.04 And is there any platform for it and how to get it ? or learn it by Terminal and how to ...
0
votes
1answer
258 views

Undefined reference to gdk function

I have a gtk program in which I am trying to call a gdk function. I have the following include files: #include <gtk/gtk.h> #include <gdk/gdk.h> and am compiling with the following: gcc ...
1
vote
1answer
2k 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?
1
vote
1answer
117 views

GTK+ Custom Accelarator Groups

I have successfully manage to add an accelerator to a menu item with the gtk_widget_add_accelerator() function. What bothers me is how i can add a custom accelerator that widget.With the first ...
0
votes
1answer
101 views

Development environment for Linux wireless using sparse

I am used to Eclipse and Visual studio for development for Java and C#. I am looking forward to modify and compile some files in C in the Linux Wireless subsystem. The site recommends using Sparse but ...
7
votes
1answer
6k views

How to make Eclipse CDT's Linux GCC toolchain resolve C++ standard library headers?

In Ubuntu 12.04 LTS I installed the Eclipse CDT plugin and opened the new hello world project to just test everything out. When I was creating the project, I chose the only toolchain: "Linux GCC" ...
6
votes
2answers
6k views

Valgrind does debug error

I have been trying to follow the online tutorial for Learn C The Hard Way. However after setting up valgrind (I followed other links that help setting up valgrind on ubuntu 12.04), when I try to ...
2
votes
1answer
454 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 ...
4
votes
3answers
4k views

Compiling C++ inside a folder in Ubuntu 12.04

I have some question about compiling .cpp inside a folder, it says first.cpp No such file or directory but when I run it in home it compiles. Any settings I might have left out? Thanks. Here's ...
0
votes
1answer
138 views

Unendable question C or C++

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 ...
3
votes
1answer
729 views

How to let an icon in the launcher wiggle?

Trying to let my python application inform the user by wiggling or shaking its icon in the launcher, I found: Wiggling seems to be the "urgent animation": How can I change the wiggle time of ...
7
votes
1answer
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 ...
1
vote
2answers
3k views

How to install custom c library?

I just wanted to add a c library to Ubuntu which was created by Harvard University for cs50 course. They provided instructions for how to install the library which is listed below. Debian, Ubuntu ...
8
votes
3answers
17k views

My program cannot run with “command not found” error

I just switched from Windows to Ubuntu 11.10. I wrote the following code in C with the text editor and saved it as HelloWorld.c in Documents. #include <stdio.h> int main() { printf("Hello ...
0
votes
1answer
348 views

Help with tool recommendation, to build a parse tree for C source code

I need a tool that can generate a tree for a C application. like walking through it to build which methods is called
3
votes
1answer
466 views

What does 'webmin' come up in the netstat/lsof listening ports?

I have my own server application in C, I bind my server on localhost address 127.0.0.1 and let it listen in first case on port 10000 and in second case on port 20000. When I run command I lsof | grep ...
0
votes
2answers
614 views

Firewall configuration and consequences

I'm using Ubuntu 11.10. And I want to know something about firewall in Ubuntu, because I want to know if it could be the reason why my application doesn't work properly. Little background: I'have ...
0
votes
1answer
374 views

Write Desktop Background Changer in C [closed]

I am completely new to writing programs for Ubuntu and using the available api. But I wish to write a desktop background changer of my own in C. Are there any api available which would help me write ...
1
vote
1answer
227 views

LINUX and C : What does it mean this condition, and how to install the required packages in order to return true

Using linux ubuntu with metasploit framework, i have a shell script which contains the following lines in the first begining of the file. At first glance i thought that i should install the the ...
0
votes
1answer
690 views

Finding a C struct or header in man pages?

When programming in C, I like to use man sections 2 and 3 to look up the form of system and library calls. But I also often need to look up the form of a struct that is defined in a standard library. ...
8
votes
2answers
13k views

What provides curses headers named curses.h?

I need a few header file namely curses.h for text based programming Please tell me how to install these header files.
16
votes
2answers
33k views

Installing curl.h library

could you help me install curl.h library? I am creating a program that makes use of this C library. I'm on Ubuntu Linux. Thanks.
1
vote
3answers
230 views

How to detect if appmenu is active?

Is it possible to check from the application if its menu will be displayed in the window or in the panel (AppMenu)? I can of course check if the environment is Unity, but some people use AppMenu in ...
1
vote
0answers
270 views

need help compiling SDL as a windows executable on ubuntu [closed]

I'm trying to compile JumpnBump to run on Windows, from Ubuntu and it's giving me a very hard time. Somebody made a port, that I have to compile myself because I needed to change the controls. There ...
10
votes
1answer
397 views

How do I add a slider to an AppIndicator?

I'm trying to add a slider to an AppIndicator similar to what the Sound Menu has. I've looked trough the code of the Sound Menu and found that I should be using libido-0.1 for that. Here's what I have ...
2
votes
3answers
5k views

How to compile c & c++ programs?

I read somewhere that I need to install 'build essential packager' & so I tried: sudo apt-get install build-essential Reading package lists... Done Building dependency tree Reading state ...
1
vote
1answer
186 views

Can't get menus to show up in custom indicator

I am trying to get a menu to show in a custom application written in C. I create the GtkMenu, populate it with GtkMenuItem(s) and add it to the indicator, which shows up in the indicator list, but the ...
5
votes
3answers
4k 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
2answers
1k views

Meaning of “netinet” in socket programming [closed]

What are the meanings of "netinet" and "in" in "#include <netinet/in.h>" ?
1
vote
1answer
480 views

GCC headers on Ubuntu

I was wondering, if there was a go to place to look for c headers, and how to get them on Ubuntu, often times a quick Google search gets me the apt-get package. I was wondering if it possible look up ...
1
vote
1answer
354 views

How do I generate a file with suitable permissions using sprintf() & write()?

#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/stat.h> void main(){ char tmp[12]={0x0}; int i=13; sprintf(tmp,"%11d", i); int fd = ...
2
votes
1answer
610 views

Problem recompiling using make command

I'm trying to modify some C++ files in ns2 and then recompile using make command. Although new .o file is created after make, the output is similar to that of previous C++ file (before modifying). Can ...
6
votes
1answer
241 views

How can I use apt-get to list all packages written in C?

Is there any way I can use apt-get to give me a list of all packages written in C, or having C modules in them?
1
vote
1answer
5k views

how to read time zone information

I was looking at some book of system programming.It mentioned to use a variable TZ with a colon : separate list which is used from /usr/share/zoneinfo probably the book is a bit outdated.I checked on ...
5
votes
2answers
1k views

strlen returns incorrect value when called in gdb

So I'm noticing some severely incorrect behavior from calls to standard library functions inside GDB. I have the following program to illustrate: #include <stdio.h> #include <stdlib.h> ...
8
votes
5answers
11k views

Where does Ubuntu store its library files?

I want to add my own library to use in c compiling, but don't really know where ubuntu stores it.
1
vote
2answers
2k views

How make a configure/makefiles from an C file?

Hope this is not a stupid question. But here it goes... Over the last month I have learned Programming in C and Gtk to a point where I have written a small program in C. I would like to make a ...
1
vote
4answers
865 views

What are some IDEs for C/GTK2 [duplicate]

Possible Duplicate: C programing suites/IDEs What is the best IDE for C + GTK2 programming? I currently use gedit and try MonoDevelop.