View Full Version : Help with error message while running a test.
JGamalinda
04-29-2009, 08:14 AM
Hello,
I received the following error while doing a test and can't figure out why.
"error GEN1007: Reference to constant $COMPILECONST$ has not been previously defined."
I've attached screen shots below.
I recently modified an exisiting SB6 file by adding an "If" statement to add a folder. Ever since then I get this error when I do a test.
Any help would be appreciated. Thanks.
linder
04-29-2009, 08:50 AM
Hello,
You instruct the compiler to get the value for the $COMPILECONST$ constant from the command line. It displays this error if nothing is received from the command line compiler. For example, if you compile that script from the GUI, nothing can be received from the command line.
The following would be a valid command line for this:
sbuilder.exe /C "c:\test.sb6" /SC COMPILECONST "1"
Does this help?
Friedrich
Unregistered
06-30-2009, 03:38 PM
Hello,
You instruct the compiler to get the value for the $COMPILECONST$ constant from the command line. It displays this error if nothing is received from the command line compiler. For example, if you compile that script from the GUI, nothing can be received from the command line.
The following would be a valid command line for this:
sbuilder.exe /C "c:\test.sb6" /SC COMPILECONST "1"
Does this help?
Friedrich
In the SB environment is there a way to specify a command line for the project to be using when compiling, testing, debugging, etc, from within the environment?
E.g. in VB6 the Project settings Make tab has "Command Line Arguments" that are used when Run or Debug is clicked in the IDE.
Or can you suggest some code like this psuedo code
#IF CommandLine()
#const $COMPILECONST$ from command line
#ELSE
#const $COMPILECONST$ = "123456"
#msg "You faled to pass CompileConst on command line, 12345 is assumed"
#END
Unregistered
06-30-2009, 03:48 PM
Hello,
You instruct the compiler to get the value for the $COMPILECONST$ constant from the command line. It displays this error if nothing is received from the command line compiler. For example, if you compile that script from the GUI, nothing can be received from the command line.
Friedrich
Now that I defined #const $COMPILECONST$ = "12345" when I run my compile in the Sb IDE I get an error "GEN1025: Unable to write version resource". I end up with a little 13Kb Setup.exe that does nothing.
I searched the help for Version Resourse and cannot find anything. Cannot find GEN1025. The script is 1080 lines long so I'm guessing the error is after my script.
...
Calculating Feature and Type sizes...
Resolving compiler variables...
Analyzing installation script (protection mode)...
Linking installation script...
Code size: 18,594 bytes
Linking loader...
Compile Version Resource...
bestcase.sb6(1081): error GEN1025: Unable to write version resource:
Code size: 13,312 bytes
Linking decompression library...
Code size: 9,418 bytes
Processing Uninstall Code-Signing...
Adding Digital Certificate to Uninstall...
Successfully code signed Uninstall Object
linder
07-01-2009, 02:00 AM
Hello,
I would suggest to use a compiler variable instead of constant.
I have attached a demo. Unzip into a temporary folder and start BATCH_DEMO.BAT. It will compile a setver.exe and set the version resource to 1.2.3.4 (passed via the command line).
It will also pass 12345 to the COMPILERVAR1 compiler variable.
BTW, this demo assumes that sbuilder.exe is located in C:\Program Files\Lindersoft\SetupBuilder 6 Developer
Does this help?
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder is Windows installation -- "point. click. ship"
-- Official Comodo Code Signing and SSL Certificate Partner
linder
07-01-2009, 02:05 AM
By the way, you declare [COMPILERVAR1] in the Compiler Variables Visualizer (see attached screenshot).
Friedrich
linder
07-01-2009, 02:17 AM
And the value of [PRODUCTVER] is set to 1.2.3.4 through the command line -- [PRODUCTVER] is then used here (see attached screenshot) to set the version number in the Version Resource.
Friedrich
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.