Linking the DLL

Finally, use qld to link the DLL with the code produced in the previous steps and any additional libraries, e.g.

     C:\> qld -Ydo vbqp.dll vbqp.qof vbqp.obj -LD oleaut32.lib
     

Please note: qcon will complain that there is no runtime_entry/1. This can be ignored.

The option -o is used to name the resulting DLL, in this case vbqp.dll. The option -d is used to ensure that any dependencies are also linked. The option -LD passes the rest of the command line to the linker, in this case it causes the library oleaut32.lib to be linked with the resulting DLL.

The option -Y (new in this release) tells qld to produce a DLL as opposed to an ordinary EXE file. A similar effect could be obtained with:

     C:\> qld -do vbqp.dll vbqp.qof vbqp.obj -LD /dll oleaut32.lib