art590 0 Posted June 18, 2015 Report Share Posted June 18, 2015 Hello. 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. ... success "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 http://www.sourceboost.com Copyright© 2004-2015 Pavel Baranov Copyright© 2004-2015 David Hobday failure Failed to locate output file 'Debug\member_constant.hex' Done Failed ----------------------------------------------------------------------------------- class Foo{ static const int a=0x08; public: int xPlus8(int x){ return (a+x); }; }; Foo foo; void main() { int res; res = foo.xPlus8(10); } Quote Link to post Share on other sites
Recommended Posts
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.