Stop creation of .lib and .exp when building a .dll with Visual Studio [duplicate]
Asked Answered
P

2

8

I am building a .dll using the Visual Studio toolset (2008). When I do the linking step:

link -nologo -OUT:Foo.dll Foo.obj -DLL -IMPLIB:None.lib

This creates None.lib and None.exp. It also displays the message:

Creating library None.lib and object None.exp

I'd like to suppress the creation of those two files, and the associated message. The message is annoying and makes it hard to see more useful messages in the build log. The files aren't particularly big but do contribute to hard drive traffic and file fragmentation.

I have tried looking for flags that I can pass to link, without any luck. I also tried setting -IMPLIB:nul, but that fails as it tries to read from the nul.exp first.

Photophobia answered 27/10, 2009 at 14:12 Comment(1)
This is of interest to me as well.Lamberto
C
2

There are no flags you can pass to LINK to prevent the creation of an import library or exports file.

I suggest you simply ignore the message.

Chetchetah answered 19/6, 2012 at 15:37 Comment(0)
M
0
  • To disable generation of .lib use /NOIMPLIB linker switch.
  • To disable generation of .exp files use /NOEXP linker switch.
Malaspina answered 30/4, 2024 at 12:27 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.