Iostream and string in L4Re

Erry Pradana Darajati pradana.erry at gmail.com
Tue Dec 23 12:01:54 CET 2014


​Hi,
I already fix the line to this line >> REQUIRES_LIBS   +=
libc_be_file_stdin libstdc++
but it still gave error. But the error is not in the compiler. It's on the
linker.
My code is like this :

 char cmd[12] ;
  printf("Initialization Finished\n");
  while(1)
  {
    printf("erry at erry-OS : \t");
    gets(cmd);
    if(strcmp(cmd,"clear")==0)
    {
        .............
It gives undefined referenced error to gets in main.o (Liunker error not
compiler error). Where do i go wrong. And also, how to use getline() in
this scope ?

>> And also, how to make hello-cfg be able to accept keyboard input. I have
>> already include libc_be_file_stdin and include line below in my hello.cfg
>> but it still not working :
>>
>> *L4.default_loader:start({ caps = { log = L4.Env.log,},l4re_dbg =
>> L4.Dbg.Warn,log = { "l4linux", "yellow" },}, "rom/hello");*
>
>That looks ok to me. How are you trying to get the input in your
>program?

I'm trying to get input using getchar(). But when i load the kernel. It's
still skips the input sequence and going into loop (I'm accpeting the
keyboard input inside While(1))

Thank you for any help

-- 
*Regards,*
*Erry Pradana Darajati | Student of Computer Engineering*
*Politeknik Elektronika Negeri Surabaya / EEPIS, Indonesia*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20141223/5b1600ad/attachment.html>


More information about the l4-hackers mailing list