This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

uSTL hello world


Hi Uwe

There seems to be a problem with the uSTL hello world example given in
the uSTL documentation. The code produces no output. However, if I add a
printf() call after the cout.flush(), then I see _both_ messages.

This is not a case of printf() flushing the output - I can observe the
output from cout on the diagnostics channel _before_ the call to
printf() is made. In fact, if I move the printf() call to the start of
main(), then everything still works.

eCos was configured with default template, pc_i82559 target, ustl and
fileio packages added, no optimization. Debugging via RedBoot over ethernet.

Does the hello world example work unmodified on your own hardware platform?

John Dallaway

--cut here--

#include <ustl.h>
//#include <stdio.h>
using namespace ustl;

int main (int argc, char* argv[])
{
    cout << "Hello world!\n";
    cout.flush();
//    printf("Hello printf!\n");
    return EXIT_SUCCESS;
}


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]