- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi folks-
In my NIOS2 project I started using sscanf() to parse text strings. The linker complains that sscanf is not found. Research tells me turn off the SmallC option on the nios2-elf-gcc command line (disable "-msmallc"). Looking at the properties of project, nios2-elf-gcc doesn't explicitly state the -msmallc option. So I conclude there must be another way to control the use of the SmallC library. Can anyone tell me the right way to turn on link support for sscanf()? Thanks, John.Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually I would generally avoid using any of the scanf family of functions. They are very difficult to use properly - ie verifying all input and without leaving the code open to expliots.
Use strtoul() and friends to parse numbers and str* (but not strtok) for stings.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It turns out exclusion or inclusion of the Small C library is controlled using a checkbox in the System Library Properties dialog box.
JJS
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page