> Subject: Re: Handling missing export functions in MSVC linkage > > On Sun, 7 Jun 2020 12:26:56 +0000 > Tal Shnaiderman <tal...@mellanox.com> wrote: > > > In clang build the .map file is converted into Module-Definition (.Def) > > File. > > If you create a .def manually, it will override the generation from .map. Of > cause, this adds manual work and ideally all .def files should be generated. >
Right, eal uses this ability, however in the metrics lib this will not be sufficient since in case jansson is found (and it does have Windows support) we do want to export the full .map file > > > Is there a way to instruct the linker to ignore missing functions in the def > file? > > There is /FORCE:UNRESOLVED, but it will ignore *any* unresolved reference, > that's why I'm against using it---this can lead to hard-to-diagnose errors. > > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs. > microsoft.com%2Fen-us%2Fcpp%2Fbuild%2Freference%2Fforce-force-file- > output%3Fview%3Dvs- > 2019&data=02%7C01%7Ctalshn%40mellanox.com%7Cee173c939f094360 > 14f708d80b403a2d%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C6 > 37271717789602353&sdata=AfIjZd5K2Grztih%2Fu7utJQZimsjpCX7qgxn0 > Z9n0hd0%3D&reserved=0 > > The only proper way I see is forgenertor script to analyze both names .map > and symbols .lib to filter out undefined functions. Dumpbin.exe should be > able to list symbols and it comes with MS Windows SDK, IIRC. > Looks like a good solution to me, however I'm not familiar with the availability of Dumpbin We can discuss this solution in the upcoming community call, thanks! > -- > Dmitry Kozlyuk