Jump to content

Recommended Posts


I am wondering if "const int" or "static const int" class members are supported ? Compiles ok but linker doesn't seem to be able to resolve. I tried with both in class and out of class initialization.


Any help would be much appreciated.



"C:\Program Files\SourceBoost\boostlink_picmicro.exe" -idx 1 /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib Debug\member_constant.obj /t PIC16F84 /d "Debug" /p member_constant
Error: Failed to resolve external:Foo$a
Error: Failed to resolve external:Foo$a
BoostLink Optimizing Linker Version 7.30
Copyright© 2004-2015 Pavel Baranov
Copyright© 2004-2015 David Hobday
Failed to locate output file 'Debug\member_constant.hex'



class Foo{
static const int a=0x08;
int xPlus8(int x){ return (a+x); };
Foo foo;
void main()
int res;
res = foo.xPlus8(10);




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.

  • Create New...