[Click] Compile a non-element class in Click
Tushar Soni
omega_marines at yahoo.com
Wed Sep 3 12:34:44 EDT 2008
Hi,
Rename your files to testcompile.hh and testcompile.cc.
According to the FAQs section:
"Each element class should be written as two C++ source files, FILE.cc and FILE.hh."
I think this holds true for a normal class as well (which is not an element).
Regards,
Tushar
Tºüçhé §übt!é
----- Original Message ----
From: Giovanni Di Stasi <gdistasi at gmail.com>
To: click at pdos.csail.mit.edu
Sent: Wednesday, September 3, 2008 5:54:34 PM
Subject: Re: [Click] Compile a non-element class in Click
On Wednesday 03 September 2008 16:50:49 Bart Braem wrote:
> On 03 Sep 2008, at 16:35, Giovanni Di Stasi wrote:
> > I'm not having success in compiling a C++ class (that is not an
> > element) in
> > Click.
> >
> > I added CLICK_DECLS after the beginning of the cpp file, just after
> > the
> > include directives, and
> >
> > CLICK_ENDDECLS
> > ELEMENTS_PROVIDES(Lq_quality)
> >
> > at the end of the same file.
> >
> > I try to compile issuing make elemlist and make, but that file is
> > not getting
> > compiled.
> >
> > Do you have any hints?
>
> Please post your code and the error you get, it is impossible to debug
> your problem without it.
> Even a limited version of the code without functionality is alright.
>
> Regards,
> Bart Braem
I realized a simple class that does not get compiled as well:
// testcompile.h
#ifndef TESTCOMPILE
#define TESTCOMPILE
#include <assert.h>
class TestCompile {
public:
TestCompile(){
int i=0;
i++;
i=i-1;
test();
}
void test();
};
//testcompile.cpp
#include "testcompile.h"
CLICK_DECLS
void TestCompile::test(){
int j=0;
j++;
j--;
}
CLICK_ENDDECLS
ELEMENTS_PROVIDES(TestCompile)
Both files are placed in a the directory elements/local/fcra
Thanks for the support.
--
Giovanni Di Stasi, Junior Researcher
Dipartimento di Informatica e Sistemistica
Università degli Studi di Napoli "Federico II"
Via Claudio, 21 - 80125 Napoli - Italy
Phone: +39 081 7683821
Fax: +39 081 7683816
E-mail: giovanni.distasi at unina.it
_______________________________________________
click mailing list
click at amsterdam.lcs.mit.edu
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list