[dpdk-dev] Handling missing export functions in MSVC linkage

Tal Shnaiderman talshn at mellanox.com
Sun Jun 7 14:26:56 CEST 2020


Hi,

I was wondering if there is a known solution for the following problem:

Whenever building a DPDK library using clang/MSVC there is an linkage issue if the rte_*_version.map names a function that isn't being compiled.

For example, in librte_metrics several files in the lib build depend on the existence of jansson, however, since the functions in those files are stated in rte_metrics_version.map MSVC prints out
errors in the linkage stage in case jansson is missing:

*error LNK2001: unresolved external symbol rte_metrics_tel_.... 

In clang build the .map file is converted into Module-Definition (.Def) File.

https://docs.microsoft.com/en-us/cpp/build/reference/module-definition-dot-def-files?view=vs-2019

Is there a way to instruct the linker to ignore missing functions in the def file?

Thanks,

Tal.




More information about the dev mailing list