[Click] Compile a non-element class in Click

Giovanni Di Stasi gdistasi at gmail.com
Wed Sep 3 11:54:34 EDT 2008


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



More information about the click mailing list