9. Compiler Settings
The compiler settings used by Visual LANSA are not usually a significant part of the decisions required to install Visual LANSA. Visual LANSA generates portable C and C++ code that just requires a supported compiler to compile it correctly. Which compiler the Visual LANSA install chooses to use does not normally effect the LANSA application.
But compilers are software and software has defects, so it may be important. Its particularly important when considering the Windows Build Machine. It is also recommended to use the same compiler on every developer PC.
The Visual LANSA install searches the machine for a compiler that is supported by the current version of Visual LANSA. If one is not found, it will install the Microsoft compiler shipped with Visual LANSA (LANSA-shipped Compiler). If one is found, it does nothing .
When you logon to Visual LANSA, if the LANSA-shipped compiler is enabled, that is used. Otherwise the same search for a supported compiler is performed as occurs with the Visual LANSA install.
The details of the algorithm are as follows:
1. Check the LANSA-shipped compiler registry setting. The keys used for each version of LANSA are listed:
V11.xHKEY_LOCAL_MACHINE\SOFTWARE\LANSA\MicrosoftCompiler
V12.xHKEY_LOCAL_MACHINE\SOFTWARE\LANSA\MicrosoftCompiler\2.0
V13.xHKEY_LOCAL_MACHINE\SOFTWARE\LANSA\MicrosoftCompiler\2010
In these keys the value Enabled = 1 indicates that the LANSA-shipped compiler is to be used and the InstallDir value is where the compiler is installed. So installing a supported Microsoft compiler after the install will not change the compiler used. The LANSA-shipped compiler needs to be disabled by setting Enabled = 0.
2. Search for the latest supported compiler. Microsoft's compilers are designed to be installed side-by-side. Each release has a unique identification. The latest compiler found that is supported by the current version of Visual LANSA is the one used. So, if the LANSA-shipped compiler is not enabled, and a later supported Microsoft compiler is installed, it will be used.
3. Use whatever values have been set in the windows environment for PATH, INCLUDE and LIB.
For example, If Microsoft Visual Studio 2005 was the latest compiler installed on the PC when Visual LANSA V12 was first installed, then Microsoft Visual Studio 2005 will be used by the Development Environment. If Microsoft Visual Studio 2008 was then installed, then that would be used by Visual LANSA V12. But, if Microsoft Visual Studio 2012 was then installed, it would not be used because it is not supported by Visual LANSA V12.
Likewise, if Microsoft Visual Studio 2012 is the only compiler installed when you first install Visual LANSA V12 on a machine, it will be treated as if a compiler is not installed and the LANSA-shipped compiler will be installed.
Your local LANSA Agent will give you details about supported compiler versions or you can refer to the LANSA Supported Platform document.