How to make an app - Andromo App Maker


No announcement yet.

Undefined preprocessor variable error

  • Filter
  • Time
  • Show
Clear All
new posts

  • Undefined preprocessor variable error

    I had MSI Factory version 2.1.1007 and it works ok.
    After uninstalling it and installing 2.1.1020 during compilation of our merge modules I receive errors
    error CNDL0150 : Undefined preprocessor variable '$(var.BUILD_VERSION)'.

    In "Build settings" dialog "variables" tab I have variable "BUILD_VERSION" defined
    In "Project settings" dialog I set parameter "Module version" as $(var.BUILD_VERSION)

    Then build an installer and receive this error.
    Any help will be appreciated.

  • #2

    please generate the WiX files for the merge module with Build > Generate WiX files.

    Open the main source file (like merge_module.wxs) in a text editor.

    Locate the string <?include BuildVars.wxi?>, cut it and paste it before the line where Module is being defined (and where the first build variable is used).

    Click image for larger version

Name:	SNAG-2012-04-19-01.png
Views:	1
Size:	62.7 KB
ID:	283686

    Then use the batch file in the same folder to build the merge module, which now should work correctly.

    In version 2.1.1020, the build variables are being included after the first one is being referred to, which causes the compiler error. This appears to happen only with merge module projects, not with MSI packages. I'll file this a bug.