Compiling and Linking Programs

AutoCAD AutoLISP & Visual LISP

 
Compiling and Linking Programs
 
 
 

Each time you load AutoLISP® source code, the code is translated into instructions the computer understands (executable code). The advantage of having source code translated each time you load it is that you can make a change and immediately try it out. This is useful for quickly testing new code, and for debugging that code.

Once you are sure your program is working correctly, translating AutoLISP source code each time it loads is time-consuming. VLISP provides a compiler that generates executable machine code files from your source files. These executable files are known as FAS files. Because the executable files contain only machine-readable code, the source code you spent weeks or months developing remains hidden even if you distribute your program to thousands of users. Even strings and symbol names are encrypted by the VLISP file compiler.

VLISP also provides features for packaging more complex AutoLISP applications into VLISP executable (VLX) files. VLX files can include additional resources files, such as VBA and DCL files, and compiled AutoLISP code. See Making Application Modules for instructions on building VLX files.

Using VLX files, you can further control your application's operating environment by exposing only those functions you choose to expose, and by maintaining a wall between your program's variables and the variables users can interact with in AutoCAD. For more information on controlling the operating environment of a VLX, see Designing for a Multiple Document Environment.