Project building .exp and .lib files for no apparent reason
-
A program I'm working on has been linking incredibly slowly. It'll show "Linking..." for less than half of the linking time, and then the rest of the time is spent "Creating library [programname].lib and object [programname].exp". The thing is, the program is an executable and thus shouldn't be making those files (which are only a few kilobytes in size), right? I can't find a reference to those files anywhere in the solution or project files, and none of the compiler/linker settings I've enabled/disabled have affected it. How do I stop those files from being built?
-
A program I'm working on has been linking incredibly slowly. It'll show "Linking..." for less than half of the linking time, and then the rest of the time is spent "Creating library [programname].lib and object [programname].exp". The thing is, the program is an executable and thus shouldn't be making those files (which are only a few kilobytes in size), right? I can't find a reference to those files anywhere in the solution or project files, and none of the compiler/linker settings I've enabled/disabled have affected it. How do I stop those files from being built?
You stop them by never link your app :-) Jokes aside, if you export files fro your application - for example if you have a callback function that a DLL will use, those two files must be created to make it possible to mutually link the app and the DLL. So, if you get them, you most likely need them. There are lots of info on MSDN if you search for lib AND exp, for example this one: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_lib_output_files.asp[^].
-
You stop them by never link your app :-) Jokes aside, if you export files fro your application - for example if you have a callback function that a DLL will use, those two files must be created to make it possible to mutually link the app and the DLL. So, if you get them, you most likely need them. There are lots of info on MSDN if you search for lib AND exp, for example this one: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_lib_output_files.asp[^].
I actually figured out what was causing the problem: the project was including a header file from a DLL project that had dllexport's that weren't being #define'd out. Once I #define'd them out, the .lib and .exp files stopped being generated and links (especially incremental) were noticably faster :).