Share via


SOURCELIBS (Compact 2013)

3/26/2014

This macro definition specifies library (.lib) files to be linked with the module specified in TARGETNAME.

The default value is NULL.

When you specify the .lib files, you must specify the full path for each .lib file to be linked. Separate multiple .lib files with spaces.

SOURCELIBS= \
        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ddk_io.lib\
        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fulllibc.lib

This macro definition is typically only used when you are linking to a static library. A static library is a file that contains objects and their functions and data. It is linked to the module when the executable file is built. An export library exports some common functionality to modules or components which can use that functionality. To link to an export library instead, use the TARGETLIBS macro.

Remarks

Compact 2013 has added an additional build pass, which generates export libraries for DLLs after all other static libraries are generated. Therefore, if a static library has a dependency to an export library, the build will generate an error and stop.

If you need the last library generated to be a static library, do not link the export library if you are not calling the function of the DLL.

The build pass generates the export.dll library last.

See Also

Concepts

Sources File
TARGETNAME
TARGETLIBS