I just started playing around CE.Net with Platform builder 4.1 and a desktop
PC as a target platform.
I created a new platform for CEPC with tiny kernel. After that, added a new
project, "hello world example" as "WCE console application". I didn't add
any single line of code, everything was done by Platform builder. But I got
the following error:
'printf' : undeclared indentifier
I tried #include <stdio.h> at the top of the file. Still I got the same
error.
What should I do?
Thanks,
However the next problem you run into is where is this going to be
displayed, since tiny kernel images don't have consoles. Instead you may
try doing OutputDebugString("Your message..."), which will make it be
displayed in the DEBUGOUT section of your PB debugger if you have a debugger
attached to the image.
--
John Spaith
Software Design Engineer, Windows CE
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
"Jin-Woo Lee" <jl...@cornell.edu> wrote in message
news:#MeJ6VzjCHA.1812@tkmsftngp12...
I added the following four into my platform:
Catalog->Core OS->Headless devices->Applications & Services->C Libraries &
Runtimes-> Full C Runtime
-> Standard IO(STDIO)
-> Standard IO ASCII
-> Standard String Function
What else should I add?
Another question:
How can I get the printf() data displayed at the host PC through serial
port?
Thanks,
Jinwoo
"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message
news:uNja6I0jCHA.2256@tkmsftngp12...
> If it's a tiny kernel image most likely you don't have the component that
> includes printf in your image. Our SDK roller is smart enough to filter
> printf() out of the header file so that you know it's not part of your
image
> at compile time. To get printf() support, you need to include from the
> catalog Applications&Services Development->C Libraries&Runtimes->Standard
IO
> ASCII (STDIOA) and completly rebuild your platform.
>
> However the next problem you run into is where is this going to be
> displayed, since tiny kernel images don't have consoles. Instead you may
> try doing OutputDebugString("Your message..."), which will make it be
> displayed in the DEBUGOUT section of your PB debugger if you have a
debugger
> attached to the image.
>
> --
> John Spaith
> Software Design Engineer, Windows CE
> Microsoft Corporation
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. ?2002 Microsoft Corporation. All rights
To make the output be redirected, you need to use a not so well docced API
(will be docced in CE 4.2) that will change the default STDIO path.
Function name is SetStdioPathW, which changes where standard
input/output/err are sent to. You basically want something like:
SetStdioPathW(0, L"COM1:"); // or whatever your COM port driver name is
SetStdioPathW(1, L"COM1:");
SetStdioPathW(2, L"COM1:");
To get SetStdioPathW definition you need to "#define WINCEOEM=1" before you
include any include files. Look at Telnet Server
(\public\servers\sdk\samples\telnetd) to see this in action.
If push comes to shove you can also do a CreateFile("COM1:") (or your port)
and then do WriteFile(handle,szData,...). Not as convenient as printf,
though.
--
John Spaith
Software Design Engineer, Windows CE
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
"Jin-Woo Lee" <jl...@cornell.edu> wrote in message
news:#juLY42jCHA.1428@tkmsftngp11...
I still have problem with SetStdioPathW(). What should I include into my
program to use it?
I got the error message like:
'SetStdioPathW' : undeclared identifier
I couldn't even find it from PB help.
Thanks,
Jinwoo
"John Spaith [MS]" <jsp...@ONLINE.microsoft.com> wrote in message
news:O5Ll#6PkCHA.2204@tkmsftngp08...
Paul T.
"Jin-Woo Lee" <jl...@cornell.edu> wrote in message
news:Ou#DTFnkCHA.1860@tkmsftngp09...