Compile errors [SOLVED]

I just recompiled the first of several existing PB 2.96 projects in 3.0
The compile aborted with several errors as a result of Labels created in 2.96 that were not referenced with a GoToLabel. The unused Labels were Removed and those errors cleared on the next recompile.

There are still several errors that are still aborting the process and I am not certain where to go look for the problems. See below:

Compiling scripts:

  • script: “mainscript.c”…
    …\Shipping\bin\mainscript.c(1070): error #2001: Syntax error: expected ‘;’ but found ‘{’.
    …\Shipping\bin\mainscript.c(1071): error #2048: Undeclared identifier ‘hInstance’.
    …\Shipping\bin\mainscript.c(1071): error #2140: Type error in argument 1 to ‘SFXMainProc’; expected ‘HINSTANCE’ but found ‘int’.
    …\Shipping\bin\mainscript.c(1071): error #2048: Undeclared identifier ‘hPrevInstance’.
    …\Shipping\bin\mainscript.c(1071): error #2140: Type error in argument 2 to ‘SFXMainProc’; expected ‘HINSTANCE’ but found ‘int’.
    …\Shipping\bin\mainscript.c(1071): error #2048: Undeclared identifier ‘lpCmdLine’.
    …\Shipping\bin\mainscript.c(1071): error #2140: Type error in argument 3 to ‘SFXMainProc’; expected ‘char *’ but found ‘int’.
    …\Shipping\bin\mainscript.c(1071): error #2048: Undeclared identifier ‘nCmdShow’.
    …\Shipping\bin\mainscript.c(1072): error #2001: Syntax error: expected ‘}’ but found ‘end of input’.

Any assistance in where to look for the problem would be appreciated.

Compiled another 2.96 project in 3.0

Discovered that 3.0 does not like to see Labels beginning with an integer. Once they were all renamed to begin with an alphabetic character, that was good.

I like the ability to rename a Label but I really MISS the ability to see my list of labels like we could in the old Label manager.

Having corrected the Label names and confirmed that each If End is closed, the compile is still being aborted with the following error:

D:\IShield\701\PA\75\Win7\Shipping\bin\mainscript.c(1005): error #2061: Invalid statement termination.
Any thoughts on where to look for the problem?

It would be nice if a Line number was returned where the error was found. Even if that meant exporting Custom Actions to an editor, we might be able to narrow down the problem.

Got your files. They will be studied. Thanks.

I am also having this issue with mainscript.c when moving from 2.9.x to 3.0. I have no labels in my project. I’m attaching an image of my compilation log.

Please send us your PBPX project file by email. Email address available at http://www.installpackbuilder.com/contact

I just emailed my file. Thanks.

Compile problems fixed in PB 3.0.1

Hi.
Same problem here.
I heve big project (SAF) from PB 2xx and when i try to compile it in 3.0.2, lot of errors appear.
Last one is “C:\bin\mainscript.c(2249): fatal error #2210: More than 100 errors, please improve yourself.”

Looks like some BEGIN IF/THEN is missing an END IF/THEN custom action.
Please send your PBPX project file to us (zip it and email it to info AT gdgsoft DOT com).

[quote=“gdgsupport”]Looks like some BEGIN IF/THEN is missing an END IF/THEN custom action.
Please send your PBPX project file to us (zip it and email it to info AT gdgsoft DOT com).[/quote]

Hi.
Yes, it is possible, becouse the project is large.

I already sended it few days ago.
Sended to “info@installpackbuilder DOT com” email as “SAF 6.2.2”.

Thank you to looking on it.

Errors come from a missing “End If” custom action. New PB 3.0.3 can now detect such errors when compiling. This will avoid such cryptic compile errors.