how to use sprintf

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to use sprintf

1,884 Views
omkar787898
Contributor II

i am trying to display hex value on terminal, but it needs to be char so i can display so i  want to use sprintf but is giving error 1. I added stdio.h also. How i can use sprintf in lpcexpresso?

0 Kudos
1 Reply

1,333 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Look in the Build Log (The Build Console ) or the Problems View to find the actual error you are encountering, rather than just looking at the final "error 1" message.

The most likely cause of problems calling sprintf() though are that you are linking with the wrong library variant. You need to use "nohost" or "semihost". For more details see:

Alternatively, you might also want to check out the itoa() function:

https://community.nxp.com/message/630652 

Regards,

LPCXpresso Support

0 Kudos