Jump to content
Sign in to follow this  
Guest Joe

Typedefs Dont Work In Structs

Recommended Posts

Guest Joe

typedef unsigned char  BYTE;

typedef struct sTime
 BYTE apples;


compiles ok, but linker reports:



"C:\Program Files\SourceBoost\linker.exe" /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib t1.obj /t 12F675 /d F:\projects\OnOffTimer\code\fgh /p t1


BoostLink Optimizing Linker Version 1.9 Beta


Copyright© 2004-2005 Pavel Baranov

Copyright© 2004-2005 David Hobday

Warning: Unable to successfully create 'delay_us' for target with clock freq 4000000 Hz

Warning: argument of 'delay_10us' calls must have a value of 1 or more

Internal Error: Var:apples Unrecognised type id:268435755

Building CASM file


Memory Usage Report


RAM available:64 bytes, used:1 bytes (1.6%), free:63 bytes (98.4%)

ROM available:1024words, used:5 words (0.5%), free:1019 words (99.5%)







-- I like the bit where it says "internal error", then later on, it says "successful", which i have highlighted in red.


That's a very confused linker!



If we use:

#define BYTE unsigned char


instead of the typedef, it links successfully with no errors at-all.

Share this post

Link to post
Share on other sites



This error is created during the creation of the coff (debug info) file. It is non fatal, ie the code can is correctly created even though the error is reported.


Maybe the message should be a warning rather than an error.


Also coff file should be able to handle this type. so the error should not be reported in the first place.


This should get fixed when the other coff is made compatible with MPLABS.




Share this post

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Sign in to follow this  

  • Create New...