[Click] ELEMENT_PROVIDES question
Bart Braem
bart.braem at ua.ac.be
Wed Oct 17 03:04:16 EDT 2007
On Wednesday 17 October 2007 07:00:20 Archit Gupta wrote:
> I have two C++ files which do not contain an element. I have placed
> them in the folder elements/ip/
> Both have the line ELEMENT_REQUIRES(..) and ELEMENT_PROVIDES(..)
>
> When I do a make install, they are not "found" - they are not compiled
> along with the other click code. Any tips on how to fix this? I am a
> click newbie so any ideas are welcome.
Here's how to add C++ code files that do not contain elements:
Make a header file that looks like:
#ifndef MYSPECIALHEADER_HH
#define MYSPECIALHEADER_HH
#include <click/whatyouneed.hh>
CLICK_DECLS
... // code
CLICK_ENDDECLS
ELEMENT_REQUIRES(MYSPECIALHEADER)
#endif
And create a matching .cc file:
#include <click/config.h> // do not forget this one
#include "myspecialheader.hh"
CLICK_DECLS
... //code
CLICK_ENDDECLS
ELEMENT_PROVIDES(MYSPECIALHEADER)
Bart
--
Bart Braem
PATS research group
Dept. of Mathematics and Computer Sciences
University of Antwerp
Campus Middelheim, G3.30
Middelheimlaan 1
B-2020 Antwerpen, Belgium
Phone: +32 (0)3 265.32.91
Fax: +32 (0)3 265.37.77
Web: www.pats.ua.ac.be/bart.braem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part.
Url : https://pdos.csail.mit.edu/pipermail/click/attachments/20071017/3c1a05a0/attachment-0001.pgp
More information about the click
mailing list