Jump to content

Using Code::Blocks How can i include another headers...


Rio
 Share

Recommended Posts

For example, maybe i want use memcpy or strlen ... in string.h

i founded string.h in SSDC directory.

What i've to do to get run my application? If i add and include the header in my app in Code::Blocks , all i get is this compiler error:

error: missing definition for symbol "_strlen", required by "_output\main.o"

:-\

Link to comment
Share on other sites

hmm strlen does not seem to be included in TK's SDCCLIB... It might be necessary to make it yourself.

You'll need to get the source from SDCC (you've found that) and use fixasm.pl to make it work with MIOS and recompile.

This matter has come up a few times lately, so if you have some luck and could document the procedure on the wiki that would be really helpful!

Link to comment
Share on other sites

thx, but i've written already an function for that by myself :) . I want test how much memory will be needed to include mioslibsdcc.lib... and if it is possible to use memcpy etc.

(i want check which performance is reachable with this lib)

Link to comment
Share on other sites

The last time I included the lib it took about 5k of space (too much for my taste for one or two divisions). I'd be interested to know if it's less in the meantime, although I doubt it.

I've heard different opinions here, but IMHO, it's best to avoid complex divisions, use bitshiftings if possible (*2 and /2), or add __asm-optimized divisions (eg from the piclist) if needed and use the hardware multiplier (asm). Sofar I never needed any pointerMath, so I can't say anything about that.

Cheers,

Michael

Link to comment
Share on other sites

@audiocommander: thx again, yes i know bitshifting for multi/div from 6501 ASM :)

@stryd_one: i don't find any source from SDCC, only headers for that. There are many *.libs for different processor types in include directory of SDCC, but i don't know what i have to do..

Greets, Rio.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...