Programming :: Including Headers Recursively - Is It Right?

Jul 29, 2010

Say, I have a header file containing all required includes:
Code: /* global.h */
#include <stdio.h>
#include <unistd.h>
...
#include <dirent.h>
#include <signal.h>
... /* and so on */

I have several modules in a program (*.h *.c files) and in each *.h I include global.h, then they are included in corresponding *.c files. And I receive strange messages from compiler, like a "warning: implicit declaration of function fdopendir", "error: expected declaration specifiers or '...' before 'siginfo_t' ", "error: 'DT_DIR' undeclared..." though these types, functions and constants are all declared in system headers. What does it mean?... Compiler is GCC 4.4.4-2, system is Fedora 13 x86_64

View 9 Replies


ADVERTISEMENT

CentOS 5 :: Move Contents Of A Directory Recursively Including Hidden?

Mar 9, 2010

I have a directory: /var/www/html/something/

and it's got tons of files and directories, some containing hidden files.

I want to move all the contents of something including hidden files up to the site root at: /var/www/html/

What is the proper command for this?

View 4 Replies View Related

Ubuntu Multimedia :: Including BPM Analyzer To All ID3 Headers

Apr 28, 2010

I would like to include BPM data in all my id3 headers. I can do this one song at a time with banshee, but I have lots of songs, and it would take a very long time. In this thread I read about bmpdj and I am attempting to install this from source. I run into problems with the make command which gives me:

Code:
Link targets:
User Interface Resources:
[uic] ui-about.h
[uic] ui-album.h
[uic] ui-beatgraph.h
[uic] ui-bpmcounter.h
[uic] ui-bpmdj-pref.h
[uic] ui-bpmmerge.h
[uic] ui-capacity.h
[uic] ui-clustering.h
[uic] ui-freq-mapping.h
[uic] ui-importing.h .....
Source Files:
make[1]: *** No rule to make target `profile-clock.o', needed by `profile-clock'. Stop.
make: *** [.source-creator] Error 2

I don't know what profile-clock.o is, or what package provides it.

View 2 Replies View Related

Programming :: Headers From Richard Stevens Network Programming Book Not Installing

Oct 27, 2010

I am learning network programming via a book of Richard Stevens.The sample source codes are given here
http://www.unpbook.com/unpv13e.tar.gz
I downloaded and unzipped the file in /usr/src folder.As per the instructions given in README of downloaded archive I did.

View 5 Replies View Related

Programming :: C++: Not #including Files?

Jun 16, 2010

I'm trying to make my program as small as possible. Currently it's down to 17.8 KB, but I'd like to get it smaller (I know, I'm insane). Is there a way to not use the "#include" directive to include the entire header, but rather to just load only the stuff I need? For example, I just want to include 'sprintf' and 'printf' from stdio.h, not the entire header. Is this possible? Or am I misunderstanding some fundamental element here?

View 14 Replies View Related

Programming :: Sum The Numbers Between And Including A And B?

Feb 11, 2010

write a script in bash or shell to add the numbers between and including two numbers

View 3 Replies View Related

Programming :: Including A Space Taken From String In A Var?

Jul 26, 2011

I have a tsv file that I'm trying to break down, line by line, then column by column so to speak. The file is a list of exported usernames, passwords, and display names from an email server, I need each separate to be used in other commands to provision the new server. My problem is, each display name contains a space, as usual with people's names. Here is the script for reference:

Code:

while read line
do
uname=`echo $line | awk '{ print $1 }' >> works`
pass=`echo $line | awk '{ print $2 }' >> works`

[code]....

View 14 Replies View Related

Programming :: Recursively Upload A Folder From [2] To [1]

Apr 1, 2010

I work on two hosts, [1] with online ftp access, and [2] without ncftp installed, but with ssh access.

Now I need to recursively upload a folder from [2] to [1]. So I can't use hardfeed - which is for downloading

I think I can use a

find ./orig -exec curl ftp://pinshosting.net

But I'm not so so known with the params of find and curl to get it working recursively.

View 4 Replies View Related

Programming :: Compare Two Filenames Including The Paths?

Jun 22, 2011

I am trying to compare two filenames including the paths. Basically if two paths are similar then my program wants to display message. So I need to check for if two pathnames are same in the sorce and destination. So I was trying for the code to compare tow filename sincluding "" and if the Parent FIle Path is found in the child file path then I need to displays ome message. I was trying to modify something like this:

#!/bin/ksh
# Sample script
file1="C:TextLatestArticleNews.txt"

[code]....

View 7 Replies View Related

Programming :: Searching Recursively By Exif Date?

Feb 20, 2010

I have searched diligently but can't seem to find a way to search by exif date. Most of my searches turned up commands to manipulate EXIF data not just search by it. I have found some likely tools but suspect that I don't know enough bash to recursively find a .jpg file by it's exif date. For example, exiprobe and exifgrep look promising (see examples below).

I have made some progress. At first, I couldn't associate the file name with the date given but learned that the "n" option forces each output line to start with the file name. Now, I need to make the command recurse but can't seem to manage it.
halloween_IMG_0965.JPG: JPEG.APP1.Ifd0.Exif.DateTimeOriginal = '2009:10:31 20:58:52
If it helps, I have linked to the man pages [URL]

View 6 Replies View Related

Programming :: Compiling A C++ Program Including Libpq-fe.h Using Cygwin

Sep 16, 2010

Compiling a C++ program including libpq-fe.h by the command Code: g++ -I/usr/include -L/lib -lpq my_program.cpp for access to a PostgreSQL database results in the error Code: undefined reference to '_PQconnectdb'

View 4 Replies View Related

Programming :: Including User Defined Header File?

Apr 29, 2011

i got a sample.c which generate a linked list for sorting according to the number generated. then i want to split the sorting function into a header file. and it looks like the sort function in the header file could not access the linked list in the main. the error is dereferencing pointer to incomplete type

sample.c

Code:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

[code]...

View 2 Replies View Related

Programming :: Sed Strange Behaviour With Line Including Backslash?

Jul 1, 2010

I have a small script that takes input from one file, and uses this input to do a find/replace (with sed) to make an executable snmp trap.The input file could look something like this :JOHBURG SOUTH AFRICAOSLO NORWAY..etcThe script takes the input from this file, and preserves all words in one line as a variable (so that the variables are "JOHBURG SOUTH AFRICA" and "OSLO NORWAY", instead of JOHBURG, SOUTH, AFRICA, OSLO, NORWAY.This is working ok (in the given example, I get two variables).sed is supposed to take this variable, and use it to substitute "HITME" with the new variable.

#!/bin/bash
N=0
cat tutticodes | while read LINE

[code]....

View 21 Replies View Related

Programming :: Importing A Package Recursively (with Subpackages) In Java?

Feb 26, 2010

I'm a 1st-year CS major and am new to Java. I had a question about importing packages. As I understand it, when you use a wildcard when importing, it will import the classes within the package specified before the asterisk, but none of the subpackages in the specified package.is there a way to include all classes and subpackages recursively with a single line, instead of doing:

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;

As I understand it, it doesn't actually cause any bloat in your bytecode, so if it can be done, would there be any disadvantage?

View 4 Replies View Related

Programming :: Where To Put Headers And Cpp Files

Mar 14, 2010

I have several classes that I use for multiple programs. Where should I keep the h/cpp files so I only have to add the #include for the compiler to find them?

View 9 Replies View Related

Programming :: Rename Files Recursively, Only Keeping Last X Digits Plus Extension?

Nov 29, 2009

My problem is this:I have a number of directories, all containing files of different name lenghts, including letters, numbers and possibly spaces. I want to recursively rename all of these files, so that only the _last_ 5 digits (not counting the extension) remain. In other words: I want to cut off all but the last 5 digits and not touch the extension.

I've tried to read up on tr, rename (perl version), sed, cut etc. and browsed through some threads here, but so far couldn't quite figure out how to do it.

If someone could point me to the right (standard) CLI tools and syntax.

View 2 Replies View Related

Programming :: Cannot Compile Against ICPC Headers?

Feb 10, 2010

This compiles against g++ template headers but not against the icpc headers.
Code:
#include <string>
#include <vector>
template <typename T>
class MyList : public std::vector< T* >{
};

template <typename T>
class MyListIterator : public MyList<T>::iterator{
};
int main(){
MyListIterator< int > test;
return 0;
}

View 4 Replies View Related

Programming :: Script To Create .menu File (recursively Read Directories)?

Nov 4, 2010

I've found myself in the situation where I need to create a menu in gnome/kde for a directory structure full of documents.The directory structure looks like this:

Code:
DOCS/
.. REFERENCES/

[code]...

View 1 Replies View Related

Debian Programming :: Linux Headers For Armhf And Gcc

Jun 24, 2015

I'm running debian testing on my armhf machine. I need to install linux headers after searching with apt-cache. I ran the command

Code: Select allsudo apt-get install linux-headers-3.16.0-4-all-armhf

But it says it will also install gcc-4.8.. I checked my gcc version which is 4.9. and running. sudo apt-get install gcc . says gcc is already the new version.How do i install the headers without installing gcc-4.8

View 3 Replies View Related

Programming :: C++ - Calling Functions From Other Files And Headers?

Apr 11, 2011

I feel like there should be a cleaner way of doing this. I have one file, for example "a.cpp", calling a function from another file, "b.cpp". Currently I have it set up so that header for "b", "b.h", has the declaration of its functions. And then I'm just including "b.h" in "a.cpp". Do I have to include the "b" header file in "a" to be able to call a function from "b"? Or is there a better way I could be doing this? Like doing something different at compile?

View 7 Replies View Related

Programming :: Have Sqlite3 Headers And Start Using In Programs?

Sep 10, 2010

I'm new to database programming but I'm working in a project that makes use of sqlite3. I know I should #include <sqlite3.h> but it is not there.... i have just sqlite.h. can anyone tell me what to do to have the sqlite3 headers and start using them in my programs

View 9 Replies View Related

Programming :: Finding Maximum Length File In A Directory Recursively Using Shell Scripting?

Nov 8, 2010

I want to find maximum length file in a given directory. It should search recursivley. I want this to be done using ls and simple looping constructs.

View 6 Replies View Related

Programming :: Sort Oldest 5 Files In A Directory Tree Recursively Based On Timestamp?

Jun 3, 2010

I have a directory listing with many subdirectories having many files. I want to recursively search for the oldest 5 files starting from the base directory and not 5 from each subdirectory. I am writing a shell script which sorts them using ls -lRtur|egrep "txt|jpg" > /tmp/file1 Now from this /tmp/file1 file I want to sort the files same as what the ls -ltr command does that is oldest file time to newest file time first. How do I sort based on Linux time stamp? The files itself also have Linux timestamps embedded in them So I can sort based after extracting them as well if it is easier.
My /tmp/file1 has entries like below.

-rw-rw-r--. 1 usr1 usr1 705 2010-01-22 17:25 sample20100603173659.jpg

I want to get the 5 oldest files and then delete them.

View 1 Replies View Related

Programming :: Build Module Against Headers That Are Not From Running Kernel?

Apr 13, 2011

I'm trying to debug a module I programmed but I don't want to do it on the running host but against UML (don't want to reboot every 5 minutes).

The UML kernel I downloaded is 2.6.38.2. I have already downloaded the ubuntu kernel headers for this version (they belong to natty though I'm running maverick.... when I installed the .deb file with dpkg I had no problem at all).

Now I'd like to build said module against these headers. How can I do it?

Here's the makefile for my module code...

View 1 Replies View Related

Programming :: Add Some Compiler Flags In Code Blocks / IDE For Mysql Headers And APIs?

Jul 9, 2011

I am writing a C program which is contains Mysql header files and APIs but it can not compile it and its error is : Quote: undefined reference to

to all of Mysql APIs that I included their headers .In command line I compile my source like this with no problem: Quote: gcc test.c -Wall -o test -lz `mysql_config --cflags --include --libs`

I think code block does not have bold italic part of this command. How can I add this to code block to compile my project or those project that contains Mysql APIs (just my project not all of defined projects that has no relation to mysql APIs)with this gcc flags.

View 3 Replies View Related

Programming :: Add Some Compiler Flags In Code Blocks IDE For Mysql Headers And APIs?

Jul 10, 2011

I am writing a C program which is contains Mysql header files and APIs but it can not compile it and its error is :

Quote:

undefined reference to

to all of Mysql APIs that I included their headers .In command line I compile my source like this with no problem:

Quote:

gcc test.c -Wall -o test -lz `mysql_config --cflags --include --libs`

I think code block does not have bold italic part of this command. How can I add this to code block to compile my project or those project that contains Mysql APIs (just my project not all of defined projects that has no relation to mysql APIs)with this gcc flags.

View 2 Replies View Related

Programming :: Bash Code To Prevent Redundantly Including Files, Like Php's "include_once"?

Jul 13, 2010

I wrote some bash code to prevent redundantly including files, like php's "include_once". I've simplified it here so don't worry that it appears not to do anything:

Code: alias .='Include'
alias source='Include'
export __INC__functions=1

[code]....

View 1 Replies View Related

Programming :: Eedirect Stderr To File Including Name Of File With Error

Jul 26, 2010

It's kind of pointless imo for the types of errors that Exiv2 reports on to be written to a text file without some reference to the name of the file that prompted the error message in the first place. Is there a way to have bash identify the file that prompts the error and writes its name to the same file as the error (in my case, frencherrors.TX)?I've tried a painfully simple syntax that does something identical to a 2>&1 'suffix", namely frenchgentsfinder.sh 2 $file>>frencherrors.TX. It makes sense to me as written, but I'd like to know why I'm getting nothing on screen and everything directed to the file when what I want to see in the latter are the filenames causing the errors along with the text of the errors.

Is there another level one has to bore down into before they can garner this kind of output? If so, what is it and how does one invoke it in bash?

View 11 Replies View Related

Programming :: 'nm' Lists All Symbols - Including Static Library Symbols?

Apr 5, 2010

By issuing the 'nm' command on shared library (internally using one static library), the functions exposed by static library is also being listed, Which allows to use internal functions which is of course not intended. I have one static library having A(), B() and C() functions. Creating one shared library which has function XYS() that is using A() and B() functions from Static library. While doing 'nm' on shared library, all the static library function are being listed.

Static Lib:

#include<stdio.h>
void A(char *msg)
{
printf("

[code]....

View 4 Replies View Related

CentOS 5 :: Can't Install Kernel-headers Glibc And Glibc-headers?

May 11, 2010

Yesterday, I think I did something stupid: I removed kernel-headers, gcc, glibc-devel and glibc-headers. My box is a CentOS 5.4 webserver (it has loads of packages installed, but that was done through Virtualmin config, so it's quite coherent all in all). The thing is that now I need to reinstall at least the headers and glibc, but hey! this is what I get :

[Code]...

View 19 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved