Question about Crossstudio stdio and __putchar

Started by ds19968902 February 15, 2007
In Crossstudio I am including stdio.h and trying to use printf with my
own __putchar (over the uart). I successfully did this when my project
was being compiled by the c compiler. But then I switched all my files
to cpp. Now the linker error keeps stating that I must provide
__putchar even though I have one. It sounds to me as though the C++
compiler is having difficulty associating my __putchar to stdio.h

Would anyone know a way around this?

Thanks Alot!!!
Eric

An Engineer's Guide to the LPC2100 Series

ds19968902 schrieb:
> In Crossstudio I am including stdio.h and trying to use printf with my
> own __putchar (over the uart). I successfully did this when my project
> was being compiled by the c compiler. But then I switched all my files
> to cpp. Now the linker error keeps stating that I must provide
> __putchar even though I have one. It sounds to me as though the C++
> compiler is having difficulty associating my __putchar to stdio.h
>
> Would anyone know a way around this?
Have you declared your "__putchar" with C linkage? Else it'll be
declared with C++ linkage, thus getting a decorated symbolic name ...

___________________________________________________________
Der fre Vogel fgt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de