Undefined preprocessor variable error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • LeonidLukashin
    Forum Member
    • Oct 2009
    • 17

    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.
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5130

    #2
    Hi,

    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.

    Ulrich

    Comment

    Working...
    X