std::cout on VxWorks - VxWorks

This is a discussion on std::cout on VxWorks - VxWorks ; Hi, I was browsing archive - both Usenet and WindRiver support site. I found lots of questions about non-working cout, but not a single usefull reply. The following program: #include int hello() { std::cout return 0; } Compiled as kernel ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: std::cout on VxWorks

  1. std::cout on VxWorks

    Hi,

    I was browsing archive - both Usenet and WindRiver support site.
    I found lots of questions about non-working cout, but not a single
    usefull reply.

    The following program:

    #include
    int hello()
    {
    std::cout<<"hello\n";
    return 0;
    }

    Compiled as kernel module, tested on VxWorks 5.5 and VxWorks 6.2,
    doesn't work correctly (it simply crashes).

    If we change std::cout to printf call - it works perfectly.

    Is there anything special which needs to be done to use iostreams on
    VxWorks?

    Of course everything is compiled into the kernel (C++ support,
    IOSTREAMS, etc...). And our big C++ code works, we only have problem
    with cout.

  2. Re: std::cout on VxWorks

    On Wed, 07 Mar 2007 11:22:17 +0100, Jacek Popławski wrote:

    section 11.4 of the kernel programmers guide describes how to "munch" a
    c++ program. Basically, you run a tool to generate some C code which
    invokes the static constructors and destructors at the right times, then
    compile an link this to you program.


    A bit of a pain, but seems to work....


    > I was browsing archive - both Usenet and WindRiver support site.
    > I found lots of questions about non-working cout, but not a single
    > usefull reply.
    >

    ......

+ Reply to Thread