[Click] STL sort and kernel-level Click

Beyers Cronje bcronje at gmail.com
Mon Dec 3 06:00:05 EST 2007


>
> Fairly new Click user here.  I'm trying to compile the Linux module with
> kernel 2.6.19.2, with an additional user-defined element (called
> SeizeSwitch) included in it.  I'm running into a problem: I want to use
> the
> STL sort( ) function within SeizeSwitch, but when I try to #include
> <algorithm> at the top of my code, the compilation explodes at me - dozens
> of errors and conflicts with various Linux header files, etc.  My guess is
> that there is some sort of incompatibility with the Linux kernel module
> and
> the STL, because the same code (including algorithm header and the sort( )
> function) did successfully compile into a userlevel Click module.
>
> A smaller problem was that I also wanted to use the atoi( ) function
> defined
> in stdlib.h, and I tried to #include this, and it similarly exploded at
> me.
> Perhaps a similar incompatibility exists for stdlib.h? This isn't as big
> of
> a deal, though, since I can just write my own atoi( ) function in a pinch
> and just put the code into my .cc file.  But sort( ) isn't quite as
> simple.
>
>
> So if anyone has any ideas, or could point me to the right answer, I'd
> really appreciate it.  Thanks!
> Dan


A longer explanation:
https://pdos.csail.mit.edu/pipermail/click/2007-July/006096.html


More information about the click mailing list