Symptom
Migrating an application, which declares an external xor function, in this instance the Funcky32.dll library, from PowerBuilder version 9 to 2017 will produce syntax errors.
Environment
OS: Windows (any supported version) 3rd party: Funcky Library PowewrBuilder Reproducing the Issue
The error can be reproduced using the following steps:
-
Unzip attached PB9_funcky_xor.zip file into a local directory.
-
Open pb9_funcky_xor.pbw workspace in PowerBuilder 9.
-
Run application and a MessageBox will display.
-
Open the same application in PowerBuilder 2017.
-
You will be prompted to migrate. Click OK.
-
Click OK again to initiate migration.
-
The build will fail with an error.
-
The Errors tab of the Output window will display the following error:
---------- Compiler: Errors (10:42:57 AM) funcky_xor.pbl(funcky_xor).2: Error C0031: Syntax error ---------- Finished Errors (10:42:57 AM)
Cause
The migration error is due to 'xor' being added as a reserved word in PowerBuilder.
Solution
If you remove or rename all external function declarations to xor: FUNCTION int xor(int n,int v) LIBRARY "FUNCky32.DLL" the application will migrate and compile properly.