Linking DLLs (C++)
Go Up to Creating Packages and DLLs
You can set linker options for your DLL on the C++ Linker page of the Project Options dialog box. The default check box on this page also creates an import library for your DLL.
If you are compiling from the command line, invoke the linker (either Using ILINK32 and ILINK64 on the Command Line or Using ILINK32 and ILINK64 on the Command Line with the -Tpd
switch. For example, here is the ilink32.exe
command line (the options for ilink64.exe
are the same):
ilink32 /c /aa /Tpd c0d32.obj mydll.obj, mydll.dll, mydll.map, import32.lib cw32mt.lib
If you need a 32-bit Windows import library, use the -Gi
switch with ilink32.exe
to generate an import library.
You can optionally create a 32-bit Windows import library with the command line utility implib.exe
. For more information on implib.exe, type implib -h
at the command line.
To generate an import library for 64-bit Windows, you should use MKEXP.EXE, the 64-bit Windows Import Library Tool for C++.