Encoder causes 24 bit relocation error

We are using Windriver C++…

We are using the Encoder and we get it to compile but when we reboot we get the error…

Relocation value does not fit in 24 bits.

We get it twice which corrisponds to the fact that the encoder is using 2 digital channels.

The program failes to load.

I looked on the web and see a WindRiver post about this.


Anyone run into this?

Probably the simplest thing to do is bring up the project properties, select Build Properties and then Build Macros.
There, in the ‘Build spec specific settings’ section, click on CC_ARCH_SPEC to highlight it and then click the Edit button.
Add ‘-mlongcall’ to the end of whatever is there.
Finish properly by clicking the Apply button.
Please post a result here – whether it works or not.

Sorry it took so long to answer. We have been having problems loading code. I finally got it all working on my Vista machine at home. A student had his working but that is where we saw the 24-bit error. Based upon the fact that mine was working he reloaded all the code on his. Bingo it worked. We also loaded another student’s system and it too worked. So it looks like it was a load and update issue.


Yes and it should be noted here, for the benefit of others, that these relocation error problems seem to be a clear indication of some sort of install/update problem. Unfortunately, it is difficult to know exactly how one is supposed to achieve a coherent installation – as evidenced by the number of people tripping over this.