Open chuanic opened 9 years ago
Only if you are using userlevel click. Kernel module click cannot be compiled with STL.
On Mon, May 18, 2015 at 5:23 AM chuanic notifications@github.com wrote:
I want to create an element which can generate an txt file, the c++ code just as below:
include
using namespace std;
int main () { ofstream out("esp.conf"); int _spi = 234; int _rpl = 300;
out << _spi << endl; out << _rpl << endl;
}
— Reply to this email directly or view it on GitHub https://github.com/kohler/click/issues/193.
I use userlevel click. My code is as below:
-------------------this is my element code-------------------
-------------------this is my running error-------------------
You seem to be hitting the error when you are compiling the linux module. Compile only the userlevel click.
On Mon, May 18, 2015 at 7:33 AM chuanic notifications@github.com wrote:
I use userlevel click. My code is as below:
-------------------this is my element code------------------- [image: 01] https://cloud.githubusercontent.com/assets/4868129/7682882/bf35487c-fdad-11e4-825e-c9dea93da27c.png
-------------------this is my running error------------------- [image: 02] https://cloud.githubusercontent.com/assets/4868129/7682886/c3b2ed6e-fdad-11e4-822e-ab8599fc2d95.png
— Reply to this email directly or view it on GitHub https://github.com/kohler/click/issues/193#issuecomment-103080699.
You can disable linuxmodule at the toplevel by running the configure as follows:
./configure --enable-userlevel --disable-linuxmodule
On Mon, May 18, 2015 at 7:35 AM Avinash Sridharan < avinash.sridharan@gmail.com> wrote:
You seem to be hitting the error when you are compiling the linux module. Compile only the userlevel click.
On Mon, May 18, 2015 at 7:33 AM chuanic notifications@github.com wrote:
I use userlevel click. My code is as below:
-------------------this is my element code------------------- [image: 01] https://cloud.githubusercontent.com/assets/4868129/7682882/bf35487c-fdad-11e4-825e-c9dea93da27c.png
-------------------this is my running error------------------- [image: 02] https://cloud.githubusercontent.com/assets/4868129/7682886/c3b2ed6e-fdad-11e4-822e-ab8599fc2d95.png
— Reply to this email directly or view it on GitHub https://github.com/kohler/click/issues/193#issuecomment-103080699.
thank you very much, it works.
but the esp.conf isn't generated and if i use esp.conf file the terminal points out that segment fault.
You could also put
ELEMENT_REQUIRES(userlevel)
on a line by itself at the bottom of the element .cc file.
I want to create an element which can generate an txt file, the c++ code just as below: