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


ADVERTISEMENT

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 :: 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 :: 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 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

General :: Installed - 2.6.21 And Lzo-2.03 - How To Include Headers Files.

Apr 9, 2010

I have installed linux-2.6.21 and lzo-2.03 from source code in fedora core 7 in the same directory. Now I wanted to include header files of lzo library in the linux kernel source code. How to do that?

View 10 Replies View Related

Slackware :: What Files Are Contained In Kernel Headers

Mar 11, 2010

I need to know what files are contained in kernel headers and where are they?

Are they the same for each kernel or no?

I need slack kernel headers for kernel 2.6.27.27

I just need the headers

View 4 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 :: 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

Debian :: Finding Kernel Headers Files Difference?

Jul 3, 2009

I usually custom compile my kernel and generate the header files with the following command:

Code:

fakeroot make-kpkg --initrd --append-to-version=generic-ide kenrel_image kernel_headers

However, I noticed that there are some difference in the headers files that get generated with the above command as compared to the header files that are available from Debian repo. For example, the header files for 2.6.24 kernel have files like:

Code:

debian:/usr/src/linux-headers-2.6.24-etchnhalf.1-686/arch/x86# ls Kconfig Kconfig.cpu Kconfig.debug kernel Makefile Makefile_32 Makefile_32.cpu Makefile_64 However, if I custom compile the above kernel from Debian sources (2.6.24), the headers files does not have the above files:

Code:

debain:/usr/src/linux-headers-2.6.24-generic-ide/arch/x86# ls
boot ia32 Kconfig.cpu kernel lib mach-es7000 mach-visws Makefile mm pci vdso xen
crypto Kconfig Kconfig.debug lguest mach-default mach-generic mach-voyager math-emu oprofile power video

As you can see from above output, files like Makefile_32, Makefile_32.cpu are not present, if I generate kernel headers files using the make-kpkg command as mentioned in the beginning of the post. I happened to notice the above issue, while I was trying to compile a out-of-tree kernel module and the "make" command for those sources (some graphics card drm module) worked with the default header files (linux-headers-2.6.24-etchnhalf.1-686) but did not work with (linux-headers-2.6.24-generic-ide) because it did not find the Makefile_32. Although I was able to fix the problem by copying the Makefile_32 from linux-headers-2.6.24-etchnhalf.1-686 but I would like to know why there is a difference. This is bit of a concern because it unnecessarily breaks the out-of-tree module compilation process because of trivial reasons.

View 4 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

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

Software :: Which Headers Are "The Headers"?

Jun 14, 2010

been a programmer for a while; on windows mostly but I'm starting to learn all that I can about linux software.I've picked up a funky little NAS which has ssh access to its (i believe uLinux) environment. I've also managed to find a compiler for it (gcc compiled for ARM - GNU/Linux).The plot thickens.I've had some headaches but I've now managed to compile Apache2 without DSO support... so far so good.In getting this far I've been told by a number of people i will need "the headers" specific to the device (the NAS didn't come with source code).

Since Apache 2 (without DSO) compiled fine I know i definitely have some headers. But DSO won't build with errors that lead me to believe it may be a header issue.The question:So i have some headers which educated guess work suggests to me that these are the headers for the std c/c++ libraries.finding "the headers" to know what they are the headers for

View 4 Replies View Related

Programming :: Command For Find/Replace In Text Files (inc. Files In Sub-folders)?

Oct 11, 2010

I found this command that works great finding and replacing a simple string to another in files located in that folder and all sub-folders.

Code: find . -name '*.php' | xargs perl -pi -e 's/OldText/NewText/g'

The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.

View 1 Replies View Related

Programming :: Sort Files In Directories Based On Files Date

Sep 8, 2009

I need a script that will take all the files in a given directory and create new monthly sub-directories and sort all the files based on the creation date into the appropriate directory.For example, all files created between 01/01/09 and 01/31/09 will be placed in 'JAN-2009'

View 5 Replies View Related

Programming :: Convert RTF Files To MS Word Files Using Java?

Sep 19, 2010

In my application I came across a new requirement where I have to convert RTF files to Word and PDF formatted files. I am searching for an API using which my java application can able to convert the above specified formats.

View 4 Replies View Related

Programming :: Bash Programming - Rename Files In A Loop?

Mar 31, 2011

I need to rename the resulted searched files from a loopI have the following code:

find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done

basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell

View 10 Replies View Related

Programming :: C Header Files And Object Files ?

Sep 18, 2010

When is it good to use separate translation units and object files and link them into the main C program, and when is it good to include the header files in the main C program? I don't understand if most people include header files or if most people just link in object files and use their contents in the main program. It's sort of a simple question, but it's confusing to me and that's why I need help with it. I sort of don't understand the difference, or if there's really no difference other than the way the final result is achieved, which way is better or preferred, etc...

For example:

Code:

or:

Code:

Simple explanation of the difference? or which one is preferred or better? I've read a little on the ELF format... so is there no difference in the end result? It's just a matter of preference or necessity, and where the information is to begin with?

View 9 Replies View Related

Programming :: Create Inverted Files To Associate Files To Numbers ( Numbers Being The Index Of My Paths )?

Apr 4, 2011

am writing a small search program for my class. I have decided to use indexing for my program. Ive researched online about indexing and how search engines do it. If im gonno do that I need to create inverted files to associate files to numbers ( numbers being the index of my paths ) . Now I was wondering what would be the best way to create an inverted file ? I was going to create sql tables using mysql api in C but then again there is no array data type or vectors to store few numbers in a single column in mysql and it is not advised to use Enum or SET

View 14 Replies View Related

Programming :: Search The String "Listen" In A Few Files (config Files)?

May 9, 2011

I'm trying to search the string "Listen" in a few files (config files). I madefind /apps/apache* -exec grep -H Listen {} ;but the result list is very long. How i make a "grep -v" whith this command?

View 3 Replies View Related

Ubuntu :: Apt-get Update On Headers ?

Feb 8, 2011

Mostly just curious since everything works but in the essence of learning I'd like to know what this means.

Code:

The following packages have been kept back: linux-generic linux-headers-generic linux-image-generic 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

It is easy to see what is held back, so the question is why? I'm running Linux Mint 10 Gnome edition.

Code:

Linux 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux

View 7 Replies View Related

Debian :: Apt Stuck In Waiting For Headers 0%

Oct 24, 2015

I have the problem of app stalling at 0% when trying to update. I ran apt with the debug option

apt-get -o Debug::Acquire::http=true update

And I get the following:

Code:
Select all0% [Trabajando]GET http://security.debian.org/dists/wheezy/updates/Release.gpg HTTP/1.1
Host: security.debian.org
Cache-Control: max-age=0
User-Agent: Debian APT-HTTP/1.3 (0.9.7.9)

GET http://ftp.mx.debian.org/debian/dists/wheezy/Release.gpg HTTP/1.1
Host: ftp.mx.debian.org
Cache-Control: max-age=0
User-Agent: Debian APT-HTTP/1.3 (0.9.7.9)

After a while trying to update, it trows out this error:

Code:
Select allIgn http://ftp.mx.debian.org wheezy-updates/non-free Translation-en
W: Imposible obtener http://security.debian.org/dists/wheezy/updates/main/binary-amd64/Packages  503  DNS error for hostname security.debian.org: Name or service not known. If security.debian.org refers to a configured cache repository, please check the corresponding configuration file.

[Code] ....

I have tried changing repos, also i have verified with iceweasel the availability of the repo.

Ihave changed aldo the network setting from dhcpd to static.

I am using Debian wheezy, gnome desktop enviroment, although the DE is irrelevant.

My conections details:

Code:
Select all
eth0      Link encap:Ethernet  HWaddr 50:46:5d:b2:1b:2a 
          inet addr:192.168.2.14  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::5246:5dff:feb2:1b2a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:376446 errors:0 dropped:0 overruns:0 frame:0

[Code] .....

View 1 Replies View Related

Fedora :: How To Install Kernel Headers

Jul 24, 2009

I've installed Vmware Workstation and tried to run it only to have the following appear;

Kernel Headers 2.6.27.25-170.2.72.fc10.i586

Kernel headers for version 2.6.27.25-170.2.72.fc10.i586 were not found. If you installed them in a non-default path you can specify the path below etc.......

I've tried to search and find the kernel headers but can't find them.

View 14 Replies View Related

Fedora :: C Headers For Vmware-tools On Ws7?

Dec 21, 2009

I have installed workstation 7 and installed f12 in it. I have tried to install the tools but it cant find the headers. I have the latest kernel 2.6.31.6-166 PAE and installed the headers and devel. I have pointed the the path to /lib/modules/2.6.31.6-166.fc12.i686.PAE/build/include and /usr/src/kernel/2.6.31.6-166-fc12.i686.PAE/include and it wont take any.I have searched google and the forums and all i find is you need to install the devel and headers which i've done.

View 3 Replies View Related

OpenSUSE :: Kernel-headers For 26.34.7-0.7 Were Not Found

May 4, 2011

Today, on my 11.3 machine. the kernel was updated. When I started my vmware 7 workstation, it came up with a message "kernel-headers for 26.34.7-0.7 were not found. enter an alternative location"

View 3 Replies View Related

OpenSUSE :: Kernel Headers Not Matching / What To Do?

Jun 2, 2011

Just installed OpenSuse 11.4 on a laptop yesterday. Trying to compile VMware player, however my kernel headers are not matching with repo code...

View 9 Replies View Related

Ubuntu :: How To Correctly Choose Headers

Oct 23, 2010

I'd like to choose correct linux-header.it could be that I don't haave appropriete drivers for my machine (don't know)it's true sound and video works but when it comes to gaming everything works soo slow and I get multy freezes from wine + "log out" problems with some games not like from windows (dual boot)now I saw some linux headers from synaptic.

View 4 Replies View Related

Ubuntu :: Apt-get Hangs At Waiting For Headers

Jan 25, 2011

For two days I've been trying to update and install packages on a Lucid 64-bit system. It's a fresh install and I've never had any problems with any apt-get commands before in the two years during which I've installed Ubuntu on everything I own. It just hangs at 0% [Waiting for Headers]. I can provide more information if needed.

I suspect his may have something to do with it: (copied from terminal output)

Err [URL]

My sources.list:

# deb cdrom:[Ubuntu 10.04.1 LTS _Lucid Lynx_ - Release amd64 (20100816.1)]/ lucid main restricted
deb-src http://archive.ubuntu.com/ubuntu lucid main restricted #Added by software-properties
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

[Code].....

View 3 Replies View Related







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