+ Reply to Thread
Results 1 to 7 of 7

Thread: Help with error message while running a test.

  1. #1
    JGamalinda Guest

    Default Help with error message while running a test.

    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.
    Attached Images Attached Images   

  2. #2
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Help with error message while running a test.

    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

  3. #3
    Unregistered Guest

    Default Re: Help with error message while running a test.

    Quote Originally Posted by linder View Post
    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

  4. #4
    Unregistered Guest

    Default Re: Help with error message while running a test.

    Quote Originally Posted by linder View Post
    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

  5. #5
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Help with error message while running a test.

    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
    Attached Images Attached Images  
    Attached Files Attached Files

  6. #6
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Help with error message while running a test.

    By the way, you declare [COMPILERVAR1] in the Compiler Variables Visualizer (see attached screenshot).

    Friedrich
    Attached Images Attached Images  

  7. #7
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Help with error message while running a test.

    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
    Attached Images Attached Images  

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •