Compiler Options
The compiler is actually shipped as a CommandLine app. In VFP you can compile any window of code into a .NET Executable or .NET DLL.
While this functionality is useful, the compiler offers several options to build your programs.
The general syntax is:
vfpcompiler program.prg [program2.prg [programN.prg ...]] <CompilerOptions>
Where compiler options take the form of:
| -target:exe | library | winexe |
Let you specify what kind of assembly you want the compiler to produce.
-target:exe
Builds a console executable.
-target:library
Builds a DLL typically a Class LIbrary.
-target:winexe
Builds a executable targeting the windows subsystem. |
| -output:<file> |
Specifies the output filename; if you omit this parameter it builds one based in the first input file specified in the command line. |
| -reference:<assemblyName | pathToAssembly> |
This is a very important command. This option lets you know what assemblies your program references.
When you reference an assembly the compiler makes available the public types contained in your program.
If you get information about missing symbols, maybe you forgot to add an assembly reference.
Example:
-reference:System.xml.dll
Make available the types contained in system.xml.dll |