Silverfrost Forums

Welcome to our forums

scc error: Can't complete RBP relative address

2 Jul 2018 11:47 #22296

We are porting a GUI application from 32 to 64 bit which consists of ftn95 and C/Cpp code. When trying to compile some C/Cpp code we run into the error 'Can't complete RBP relative address'. Please look at the file string_array.cpp following.

#include <stdio.h> 

char* text_gui[16][2];
  
void myproc(char* mystring) {
  printf('myproc: mystring=%s\n',mystring);
  return;
};


main () {
  text_gui[0][0] = 'Hello!';
  myproc(text_gui[0][0]);
  return 0;
}

This code compiles for the 32 bit version of scc:

scc string_array.cpp /List

results in an object file of positive length for SCC/WIN32 Ver 4.07.

However, this does not work when trying to generate a 64 bit object file. As a result of calling

scc string_array.cpp /List /64

following lines are displayed

[Silverfrost SCC/WIN32 Ver 4.07 Copyright (c) Silverfrost Ltd 2018]
   0015   }
*** Can't complete RBP relative address
*** Can't complete RBP relative address
    2 ERRORS  [<STRING_ARRAY> SCC/WIN32 Ver 4.07]
*** Compilation failed

Moreover the length of object file STRING_ARRAY.OBJ is zero.

If we move declaration

char* text_gui[16][2];

into the main block then the 64 bit compile works and produces an object file of positive length. We could, as well, generate a 64 bit exe file from the latter code which executes as expected.

Regards, Dietmar

2 Jul 2018 12:06 #22297

Dietmar

This particular issue was noted and fixed last week so it will just be a matter of getting a new SCC to you.

On a broader issue, SCC will accept /64 on the command line but 64 bit compilation is not yet generally supported.

2 Jul 2018 1:08 #22298

Paul,

this is good news. I am very interested in this fix. Is there already a date when the new version of scc will be available and how would I download this new version?

Thanks, Dietmar

Please login to reply.